We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent caabcdb commit 156bee8Copy full SHA for 156bee8
tools/acorn-optimizer.mjs
@@ -1219,9 +1219,10 @@ function isGrowHEAPAccess(node) {
1219
if (
1220
node.type !== 'MemberExpression' ||
1221
!node.computed || // notice a[X] but not a.X
1222
- node.object.type !== 'ParenthesizedExpression')
+ (node.object.type !== 'ParenthesizedExpression' && node.object.type !== 'SequenceExpression')
1223
+ )
1224
return false;
- const obj = node.object.expression;
1225
+ const obj = node.object.type === 'ParenthesizedExpression' ? node.object.expression : node.object;
1226
return (
1227
obj.type === 'SequenceExpression' &&
1228
obj.expressions.length === 2 &&
0 commit comments