Skip to content

Commit 2b439bc

Browse files
chore: better comment
Co-authored-by: Ben McCann <[email protected]>
1 parent 26a1dfa commit 2b439bc

File tree

1 file changed

+1
-2
lines changed
  • packages/svelte/src/compiler/phases/3-transform/client/visitors/shared

1 file changed

+1
-2
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/fragment.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ function is_static_element(node) {
150150
return false;
151151
}
152152

153-
// an img with loading lazy is not static but needs the `img` to be
154-
// generated to be passed to `handle_lazy_img`
153+
// We need to apply src and loading after appending the img to the DOM for lazy loading to work
155154
if (node.name === 'img' && attribute.name === 'loading') {
156155
return false;
157156
}

0 commit comments

Comments
 (0)