|
@@ -68,7 +68,7 @@ export const createHook =
|
|
|
(hook: T, target: ComponentInternalInstance | null = currentInstance) =>
|
|
(hook: T, target: ComponentInternalInstance | null = currentInstance) =>
|
|
|
// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
|
|
// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
|
|
|
(!isInSSRComponentSetup || lifecycle === LifecycleHooks.SERVER_PREFETCH) &&
|
|
(!isInSSRComponentSetup || lifecycle === LifecycleHooks.SERVER_PREFETCH) &&
|
|
|
- injectHook(lifecycle, hook, target)
|
|
|
|
|
|
|
+ injectHook(lifecycle, (...args: unknown[]) => hook(...args), target)
|
|
|
|
|
|
|
|
export const onBeforeMount = createHook(LifecycleHooks.BEFORE_MOUNT)
|
|
export const onBeforeMount = createHook(LifecycleHooks.BEFORE_MOUNT)
|
|
|
export const onMounted = createHook(LifecycleHooks.MOUNTED)
|
|
export const onMounted = createHook(LifecycleHooks.MOUNTED)
|