Skip to content

Commit c0da1b2

Browse files
authored
fix(inertia): set serverRendered dynamically to prevent SSR crash (#5396)
1 parent f741b91 commit c0da1b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/inertia/stubs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const hooks = createHooks()
7878
export function useNuxtApp() {
7979
return {
8080
isHydrating: true,
81-
payload: { serverRendered: false },
81+
payload: { serverRendered: typeof window === 'undefined' },
8282
hooks,
8383
hook: hooks.hook
8484
}

0 commit comments

Comments
 (0)