fix: ensure logic blocks keep consitent namespacing

logic-block-namespace
Dominic Gannaway 2 days ago
parent 1d773ef3a4
commit 728f033f7e

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: ensure logic blocks keep consitent namespacing

@ -347,6 +347,14 @@ export function infer_namespace(namespace, parent, nodes) {
}
}
// If the parent block is a control block, we want to keep the namespace if it's not html
if (
namespace !== 'html' &&
(parent.type === 'EachBlock' || parent.type === 'AwaitBlock' || parent.type === 'KeyBlock')
) {
return namespace;
}
/** @type {Namespace | null} */
let new_namespace = null;

Loading…
Cancel
Save