From d6d40d90ccfdb644559d94ef0a301de989d81ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Sun, 11 Oct 2020 19:30:15 -0400 Subject: [PATCH] Update packages/babel-helper-replace-supers/src/index.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nicolò Ribaudo --- packages/babel-helper-replace-supers/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-helper-replace-supers/src/index.js b/packages/babel-helper-replace-supers/src/index.js index 8f1457c7a33a..3a8d7243b712 100644 --- a/packages/babel-helper-replace-supers/src/index.js +++ b/packages/babel-helper-replace-supers/src/index.js @@ -45,7 +45,7 @@ export function skipAllButComputedKey(path: NodePath) { // For perf reasons, the environmentVisitor will be traversed with `{ noScope: true }`, which means `path.scope` is undefined. // Avoid using `path.scope` here export const environmentVisitor = { - "StaticBlock|ClassPrivateProperty|TypeAnnotation"(path: NodePath) { + [`${t.StaticBlock ? "StaticBlock|" : ""}ClassPrivateProperty|TypeAnnotation`](path: NodePath) { path.skip(); },