nuxt · GitHub

Commit c0da1b2

authored

fix(inertia): set serverRendered dynamically to prevent SSR crash (#5396)

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/runtime/inertia

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)

Read the original on github.com ↗