Skip to content

Commit 900e482

Browse files
committed
revert changes
1 parent 48a7497 commit 900e482

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

packages/svelte/src/compiler/phases/2-analyze/visitors/Attribute.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ export function Attribute(node, context) {
3030
}
3131
}
3232

33-
if (node.name === 'autofocus' || node.name === 'muted') {
34-
mark_subtree_dynamic(context.path);
35-
}
36-
3733
if (node.name.startsWith('on')) {
3834
mark_subtree_dynamic(context.path);
3935
}

packages/svelte/src/compiler/phases/2-analyze/visitors/RegularElement.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ export function RegularElement(node, context) {
7575
node.attributes.push(create_attribute('value', child.start, child.end, [child]));
7676
}
7777

78+
if (
79+
node.attributes.some(
80+
(attribute) =>
81+
attribute.type === 'Attribute' &&
82+
(attribute.name === 'autofocus' || attribute.name === 'muted')
83+
)
84+
) {
85+
mark_subtree_dynamic(context.path);
86+
}
87+
7888
const binding = context.state.scope.get(node.name);
7989
if (
8090
binding !== null &&

0 commit comments

Comments
 (0)