Closed GauBen closed 1 week ago
Hey @dummdidumm thanks for working on this, I just bumped to 168 and the bug is still happening
(me referencing that issue was a mistake, this bug seems unrelated)
You managed to reproduce! I failed doing so without Kit
It turns out the bug is still there, but instead of not displaying the content of the {#if}
after the first toggle, it happens after the second one:
https://github.com/sveltejs/svelte/assets/48261497/dcddeaef-b0dd-4edb-ac3f-a1233614ef59
I can try creating a repro in the REPL if it helps. The exact code is the following:
@GauBen Have you tried the latest version? A REPL link would be preferable too :)
Yes, I bumped to 5.0.0-next.169 and instead of not showing after the first toggle, it fails after the second toggle
@GauBen Is it the same in dev and prod?
Just tried, it behaves the same in dev and prod
If that helps:
event.id
is a bigintevent.date
is a Date
object, not a SvelteDate
oneUpdate:
$inspect(event);
fixes the issue{#if event}
<h1>{event.author.displayName}</h1>
<p>{event.body}</p>
<a href={$page.url.pathname}>Close</a> <!-- Removing this will fix the issue -->
{/if}
Here is a stackblitz of the issue https://stackblitz.com/edit/sveltejs-kit-template-default-mhzb7t?file=src%2Froutes%2F%2Bpage.svelte,package.json
Can you please re-open?
Also works when replacing {#if event}
with {#if data && event}
.
Thanks for all the hard work Svelte team!
Describe the bug
Given the following
+page.js
:And a
+page.svelte
:Clicking Open event will show a title and a body, clicking Close will close it, clicking Open event again will do nothing.
Very small changes can make it work:
<p>{event.body}</p>
will fix the issue$inspect(event)
will fix the issue(This is likely to be a quatum physics issue given that observing the behavior changes it š)
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-mhzb7t?file=src%2Froutes%2F%2Bpage.js
Logs
No response
System Info
Severity
blocking an upgrade