chore(): fix bad merge, update tests

This commit is contained in:
Liam DeBeasi
2021-12-07 20:23:47 +00:00
parent c065d8b5d8
commit eb9bc8199d
3 changed files with 9 additions and 115 deletions

View File

@ -11,6 +11,12 @@ const injectHook = (lifecycleType: LifecycleHooks, hook: Function, component: Co
// Add to public instance so it is accessible to IonRouterOutlet
const target = component as any;
const hooks = target.proxy[lifecycleType] || (target.proxy[lifecycleType] = []);
/**
* Define property on public instances using `setup` syntax in Vue 3.x
*/
if (target.exposed) {
target.exposed[lifecycleType] = hooks;
}
const wrappedHook = (...args: unknown[]) => {
if (target.isUnmounted) {
return;