mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-28 06:39:33 -04:00
Fix issue with PaperScript and array[i++] expressions.
This commit is contained in:
parent
4bda878f5f
commit
3d78e3729d
2 changed files with 6 additions and 1 deletions
src/core
|
@ -137,6 +137,11 @@ var PaperScript = new function() {
|
|||
|
||||
// Recursively walks the AST and replaces the code of certain nodes
|
||||
function walkAst(node) {
|
||||
// array[i++] is a MemberExpression with computed = true.
|
||||
// We cannot replace that with array[_$_(i, "+", 1)], as it would
|
||||
// break the code, so let's bail out.
|
||||
if (!node || node.type === 'MemberExpression' && node.computed)
|
||||
return;
|
||||
for (var key in node) {
|
||||
if (key === 'range')
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue