mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt): make runWithContext
generic (#28926)
This commit is contained in:
parent
9edba0d7ea
commit
32a66364cb
@ -280,7 +280,7 @@ export function createNuxtApp (options: CreateOptions) {
|
|||||||
static: {
|
static: {
|
||||||
data: {},
|
data: {},
|
||||||
},
|
},
|
||||||
runWithContext (fn: any) {
|
runWithContext <T>(fn: () => T) {
|
||||||
if (nuxtApp._scope.active && !getCurrentScope()) {
|
if (nuxtApp._scope.active && !getCurrentScope()) {
|
||||||
return nuxtApp._scope.run(() => callWithNuxt(nuxtApp, fn))
|
return nuxtApp._scope.run(() => callWithNuxt(nuxtApp, fn))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user