From a097b7d3c334f7cc328167632f8f0665bfe6d494 Mon Sep 17 00:00:00 2001 From: Toru Nagashima Date: Thu, 22 Apr 2021 09:29:59 +0900 Subject: [PATCH] update acorn-walk --- acorn-walk/src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acorn-walk/src/index.js b/acorn-walk/src/index.js index 1f5ce4b14..5a76e0961 100644 --- a/acorn-walk/src/index.js +++ b/acorn-walk/src/index.js @@ -365,7 +365,7 @@ base.ImportDeclaration = (node, st, c) => { base.ImportExpression = (node, st, c) => { c(node.source, st, "Expression") } -base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore +base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore base.TaggedTemplateExpression = (node, st, c) => { c(node.tag, st, "Expression") @@ -381,7 +381,7 @@ base.ClassBody = (node, st, c) => { for (let elt of node.body) c(elt, st) } -base.MethodDefinition = base.Property = (node, st, c) => { +base.MethodDefinition = base.PropertyDefinition = base.Property = (node, st, c) => { if (node.computed) c(node.key, st, "Expression") - c(node.value, st, "Expression") + if (node.value) c(node.value, st, "Expression") }