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