-
-
Couldn't load subscription status.
- Fork 4.7k
Closed
Copy link
Description
Describe the bug
When a remote function is called and the result is awaited in <svelte:boundary> while there is also a remote function which is called without a boundary.
i.e., like so
<script lang="ts">
import { getDelayedData } from './data.remote';
const moreData = await getDelayedData();
</script>
<h1>Dashboard</h1>
<svelte:boundary>
<span>Protected Data</span>
<p>Secret: {await getDelayedData()}</p>
{#snippet pending()}
<p>loading...</p>
{/snippet}
</svelte:boundary>
<pre>
{moreData}
</pre>The page will forever show the loading state.
However, if you call the function inline like so, it works correctly,
<script lang="ts">
import { getDelayedData } from './data.remote';
</script>
<h1>Dashboard</h1>
<svelte:boundary>
<span>Protected Data</span>
<p>Secret: {await getDelayedData()}</p>
{#snippet pending()}
<p>loading...</p>
{/snippet}
</svelte:boundary>
<pre>
{await getDelayedData()}
</pre>Reproduction
Full repo is here, https://github.com/Hysterelius/better-auth-sveltekit-demo
Logs
System Info
Binaries:
Node: 24.3.0 - /home/hys/.local/share/pnpm/node
npm: 11.4.2 - /home/hys/.local/share/pnpm/npm
pnpm: 10.18.3 - /home/hys/.local/share/pnpm/pnpm
Deno: 2.3.6 - /home/hys/.deno/bin/deno
Browsers:
Chrome: 141.0.7390.107
Firefox: 144.0
Firefox Developer Edition: 144.0
npmPackages:
svelte: ^5.41.0 => 5.41.0Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels