mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
fix(nuxt): use callAsync
for executing hooks with context (#20510)
This commit is contained in:
parent
9170a721f7
commit
7ab476b1f8
@ -221,7 +221,7 @@ export function createNuxtApp (options: CreateOptions) {
|
||||
if (process.server) {
|
||||
async function contextCaller (hooks: HookCallback[], args: any[]) {
|
||||
for (const hook of hooks) {
|
||||
await nuxtAppCtx.call(nuxtApp, () => hook(...args))
|
||||
await nuxtAppCtx.callAsync(nuxtApp, () => hook(...args))
|
||||
}
|
||||
}
|
||||
// Patch callHook to preserve NuxtApp context on server
|
||||
|
Loading…
Reference in New Issue
Block a user