-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
I've encountered this bug in a Sveltekit + Svelte 5 app.
Reproduction
The reproduction might be a bit confusing. I mimicked Sveltekit because otherwise I was not able to reproduce the bug.
Click the "Change page prop" button multiple times.
The test state in Layout.svelte stays true even tho the same expression in the $inspect rune does evaluate to false which you can see in the console.
Some strange things:
- If you modify line 16 in
App.svelteto be{ a: 4, b: 'X' }- which leads totestbeingtruewhen initialized -testis changing correctly (true -> false -> true -> etc.). But if you remove line 16 inLayout.svelte, line 14 will only rerender once. - If you modify the derived expression in
Layout.sveltefrom$page.a === 4 || $page.b === 'Y'to$page.a === 4(sotestis stillfalsewhen initialized),testis changing correctly as well. But still, if you remove line 16, line 14 will only rerender once.
Logs
No response
System Info
Svelte 5Severity
blocking all usage of svelte
Metadata
Metadata
Assignees
Labels
No labels