not sure how this stayed broken for so long

pull/9826/head
Rich Harris 3 years ago
parent eb9acff49a
commit 1b38452585

@ -108,8 +108,11 @@ export const javascript_visitors_legacy = {
}; };
}, },
LabeledStatement(node, context) { LabeledStatement(node, context) {
if (context.path.length > 1) return; if (context.path.length > 1 || node.label.name !== '$') {
if (node.label.name !== '$') return; context.next();
return;
}
const state = context.state; const state = context.state;
// To recreate Svelte 4 behaviour, we track the dependencies // To recreate Svelte 4 behaviour, we track the dependencies
// the compiler can 'see', but we untrack the effect itself // the compiler can 'see', but we untrack the effect itself

Loading…
Cancel
Save