diff --git a/packages/nuxt/src/app/composables/ready.ts b/packages/nuxt/src/app/composables/ready.ts index 2360bc002d..d4a1257a19 100644 --- a/packages/nuxt/src/app/composables/ready.ts +++ b/packages/nuxt/src/app/composables/ready.ts @@ -7,8 +7,8 @@ export const onNuxtReady = (callback: () => any) => { const nuxtApp = useNuxtApp() if (nuxtApp.isHydrating) { - nuxtApp.hooks.hookOnce('app:suspense:resolve', () => { requestIdleCallback(callback) }) + nuxtApp.hooks.hookOnce('app:suspense:resolve', () => { requestIdleCallback(() => callback()) }) } else { - requestIdleCallback(callback) + requestIdleCallback(() => callback()) } }