From c1b01b991f989e05fb5ee5877b24bf3ccef0a790 Mon Sep 17 00:00:00 2001 From: pimlie Date: Fri, 13 Sep 2019 15:18:24 +0200 Subject: [PATCH] chore: add missing --- src/shared/mixin.js | 12 ++++++------ test/components/changed.vue | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/shared/mixin.js b/src/shared/mixin.js index 2dc1648..cf75ea0 100644 --- a/src/shared/mixin.js +++ b/src/shared/mixin.js @@ -48,12 +48,12 @@ export default function createMixin (Vue, options) { if (!this[rootConfigKey]) { this[rootConfigKey] = true - let p = this.$parent - while (p && p !== $root) { - if (isUndefined(p[rootConfigKey])) { - p[rootConfigKey] = false + let parent = this.$parent + while (parent && parent !== $root) { + if (isUndefined(parent[rootConfigKey])) { + parent[rootConfigKey] = false } - p = p.$parent + parent = parent.$parent } } @@ -140,7 +140,7 @@ export default function createMixin (Vue, options) { // no need to add this hooks on server side updateOnLifecycleHook.forEach((lifecycleHook) => { - ensuredPush($options, lifecycleHook, () => triggerUpdate(this, lifecycleHook)) + ensuredPush($options, lifecycleHook, () => triggerUpdate($root, lifecycleHook)) }) }, // TODO: move back into beforeCreate when Vue issue is resolved diff --git a/test/components/changed.vue b/test/components/changed.vue index 5bbf3cf..c3b1d6d 100644 --- a/test/components/changed.vue +++ b/test/components/changed.vue @@ -25,6 +25,6 @@ export default { return { childVisible: false } -f } + } }