mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
This commit is contained in:
parent
7562ecabfb
commit
1a91b120ee
@ -254,7 +254,12 @@ export function createNuxtApp (options: CreateOptions) {
|
||||
static: {
|
||||
data: {},
|
||||
},
|
||||
runWithContext: (fn: any) => nuxtApp._scope.run(() => callWithNuxt(nuxtApp, fn)),
|
||||
runWithContext (fn: any) {
|
||||
if (nuxtApp._scope.active) {
|
||||
return nuxtApp._scope.run(() => callWithNuxt(nuxtApp, fn))
|
||||
}
|
||||
return callWithNuxt(nuxtApp, fn)
|
||||
},
|
||||
isHydrating: import.meta.client,
|
||||
deferHydration () {
|
||||
if (!nuxtApp.isHydrating) { return () => {} }
|
||||
|
Loading…
Reference in New Issue
Block a user