File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
packages/svelte/src/compiler/phases/2-analyze/visitors Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,16 @@ export function Attribute(node, context) {
18
18
19
19
const parent = /** @type {SvelteNode } */ ( context . path . at ( - 1 ) ) ;
20
20
21
- if (
22
- // special case for <option value=""/>
23
- ( node . name === 'value' && parent . type === 'RegularElement' && parent . name === 'option' ) ||
21
+ if ( parent . type === 'RegularElement' ) {
22
+ // special case <option value="" />
23
+ if ( node . name === 'value' && parent . name === 'option' ) {
24
+ mark_subtree_dynamic ( context . path ) ;
25
+ }
26
+
24
27
// special case <img loading="lazy" />
25
- ( node . name === 'loading' && parent . type === 'RegularElement' && parent . name === 'img' )
26
- ) {
27
- mark_subtree_dynamic ( context . path ) ;
28
+ if ( node . name === 'loading' && parent . name === 'img' ) {
29
+ mark_subtree_dynamic ( context . path ) ;
30
+ }
28
31
}
29
32
30
33
if ( node . name . startsWith ( 'on' ) ) {
You can’t perform that action at this time.
0 commit comments