fix: initialize `files` bind on hydration (#15059)

pull/15052/head
Paolo Ricciuti 8 months ago committed by GitHub
parent 2ad519542d
commit 5ad6a0cdc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: initialize `files` bind on hydration

@ -259,6 +259,15 @@ export function bind_files(input, get, set = get) {
set(input.files);
});
if (
// If we are hydrating and the value has since changed,
// then use the updated value from the input instead.
hydrating &&
input.files
) {
set(input.files);
}
render_effect(() => {
input.files = get();
});

Loading…
Cancel
Save