mirror of https://github.com/sveltejs/svelte
fix: ensure custom element updates don't run in hydration mode (#15217)
* fix: ensure custom element updates don't run in hydration mode When a custom element is created before Svelte hydration kicks in, it will scaffold itself, using the properties given via attributes. Now when a custom element property is set during Svelte's hydration, the Svelte custom element component could run logic like updating an each block. Without turning off hydration mode during that time, the update would try to pick up existing element nodes (because it thinks they must be there because of hydration mode), and crash. No test because it would require a setup where we can ensure the element is scaffolded before hydration runs. Fixes #15213 * changeset --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/15216/head
parent
6f392d679b
commit
3b7066f5c6
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: ensure custom element updates don't run in hydration mode
|
Loading…
Reference in new issue