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