mirror of
https://github.com/morluto/rea.git
synced 2026-11-12 01:41:21 +00:00
fix(javascript): resolve preceding exported variable initializers and computed method keys (#5387)
fix(javascript): resolve variable initializers before computed method keys
This commit is contained in:
1 parent
b4118b9683
commit
cbeeeda97b
3 files changed
+86
-2
No files matched your search
@@ -131,7 +131,12 @@ export const semanticTopLevelEffectFollowsCapture = (
|
||||
let declarator: t.VariableDeclarator | undefined;
|
||||
let child: t.Node | undefined;
|
||||
while (node !== undefined) {
|
||||
if (t.isFunction(node) || t.isLoop(node)) return null;
|
||||
if (
|
||||
(t.isFunction(node) &&
|
||||
(child === undefined || !semanticComputedMethodKey(node, child))) ||
|
||||
t.isLoop(node)
|
||||
)
|
||||
return null;
|
||||
if (delayedInstanceFieldValue(node, child)) return null;
|
||||
if (t.isVariableDeclarator(node)) declarator = node;
|
||||
if (t.isStatement(node)) {
|
||||
|
||||
Reference in new issue
Block a user