You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing a srcset={null} or srcset={undefined} to an image results in a crash. In my case the srcset is generated with a function that returns undefined when the image is an SVG.
The problem only occurred after upgrading from Svelte 4.0.1 to 4.0.2.
Probably introduced with #8838, but I wonder why the srcset_url_equal function is called anyway when the srcset is nullish.
You can see
"Cannot read properties of null (reading 'split')" in the bottom right.
Logs
TypeError: Cannot read properties of undefined (reading 'split') at split_srcset
(http://localhost:5173/node_modules/.vite/deps/chunk-WHDRF6EJ.js?v=1735e15a:55:17) at srcset_url_equal
(http://localhost:5173/node_modules/.vite/deps/chunk-WHDRF6EJ.js?v=1735e15a:59:16) at Object.hydrate [as h]
Describe the bug
Passing a
srcset={null}
orsrcset={undefined}
to an image results in a crash. In my case thesrcset
is generated with a function that returns undefined when the image is an SVG.The problem only occurred after upgrading from Svelte 4.0.1 to 4.0.2.
Probably introduced with #8838, but I wonder why the
srcset_url_equal
function is called anyway when thesrcset
is nullish.Reproduction
I a repl for reproducing the error here:
https://svelte.dev/repl/4e3cac66da884b7dbe88d988fc9edcc7?version=4.0.2
You can see
"Cannot read properties of null (reading 'split')" in the bottom right.
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: