From 09d1f8a0e361a7100bb8fbb7da250ccc21a95fc7 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/babel-helper-replace-supers/src/index.js b/packages/babel-helper-replace-supers/src/index.js index 8f1457c7a33a..32e752de2ffb 100644 --- a/packages/babel-helper-replace-supers/src/index.js +++ b/packages/babel-helper-replace-supers/src/index.js @@ -45,7 +45,10 @@ 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) { + // todo (Babel 8): remove StaticBlock brand checks + [`${t.StaticBlock ? "StaticBlock|" : ""}ClassPrivateProperty|TypeAnnotation`]( + path: NodePath, + ) { path.skip(); },