revert changes

legacy-conditional-template
Dominic Gannaway 10 months ago
parent 48a7497282
commit 900e482e22

@ -30,10 +30,6 @@ export function Attribute(node, context) {
}
}
if (node.name === 'autofocus' || node.name === 'muted') {
mark_subtree_dynamic(context.path);
}
if (node.name.startsWith('on')) {
mark_subtree_dynamic(context.path);
}

@ -75,6 +75,16 @@ export function RegularElement(node, context) {
node.attributes.push(create_attribute('value', child.start, child.end, [child]));
}
if (
node.attributes.some(
(attribute) =>
attribute.type === 'Attribute' &&
(attribute.name === 'autofocus' || attribute.name === 'muted')
)
) {
mark_subtree_dynamic(context.path);
}
const binding = context.state.scope.get(node.name);
if (
binding !== null &&

Loading…
Cancel
Save