Skip to content

Commit

Permalink
Merge pull request #17032 from quanru/fix/modify-ast-params-object-re…
Browse files Browse the repository at this point in the history
…ference

fix: avoid modify ast params object reference
  • Loading branch information
TheLarkInn committed Apr 21, 2023
2 parents 770a5a9 + 8c59f89 commit 07ac433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/javascript/JavascriptParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2482,7 +2482,7 @@ class JavascriptParser extends Parser {
walkFunctionExpression(expression) {
const wasTopLevel = this.scope.topLevelScope;
this.scope.topLevelScope = false;
const scopeParams = expression.params;
const scopeParams = [...expression.params];

// Add function name in scope for recursive calls
if (expression.id) {
Expand Down

0 comments on commit 07ac433

Please sign in to comment.