From 06823fbf1c2e763a5bf76c3990ca98fbbcd98691 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 14 May 2024 14:05:49 +0800 Subject: updated node_modules --- node_modules/@babel/traverse/lib/path/modification.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'node_modules/@babel/traverse/lib/path/modification.js') diff --git a/node_modules/@babel/traverse/lib/path/modification.js b/node_modules/@babel/traverse/lib/path/modification.js index c0a6bec1..3a55cc76 100644 --- a/node_modules/@babel/traverse/lib/path/modification.js +++ b/node_modules/@babel/traverse/lib/path/modification.js @@ -112,18 +112,19 @@ function insertAfter(nodes_) { return isExpression(node) ? expressionStatement(node) : node; })); } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") { - if (this.node) { - const node = this.node; + const self = this; + if (self.node) { + const node = self.node; let { scope } = this; if (scope.path.isPattern()) { assertExpression(node); - this.replaceWith(callExpression(arrowFunctionExpression([], node), [])); - this.get("callee.body").insertAfter(nodes); - return [this]; + self.replaceWith(callExpression(arrowFunctionExpression([], node), [])); + self.get("callee.body").insertAfter(nodes); + return [self]; } - if (isHiddenInSequenceExpression(this)) { + if (isHiddenInSequenceExpression(self)) { nodes.unshift(node); } else if (isCallExpression(node) && isSuper(node.callee)) { nodes.unshift(node); -- cgit v1.2.3