Skip to content

Commit ed143ee

Browse files
authored
chore(ssr): Only render children if there are no conditions specified (#86)
This was the original intention, but in SSR (Sveltekit), this is not the reality. The route component registers its conditions with the router using $effect.pre(), which doesn't run on the server, causing all routes to be briefly visible.
1 parent 900ad8a commit ed143ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/Route/Route.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,6 @@
169169
});
170170
</script>
171171

172-
{#if (router.routeStatus[key]?.match ?? true)}
172+
{#if (router.routeStatus[key]?.match ?? (!and && !path))}
173173
{@render children?.(params, router.state, router.routeStatus)}
174174
{/if}

0 commit comments

Comments
 (0)