From 56ce7f8c573116ed6683149206cf35c987249d42 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 24 Dec 2023 22:40:05 +0800 Subject: [PATCH] fix(lifecycle): esnure component effect scopes are disconnected close #13134 --- src/core/instance/init.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/instance/init.ts b/src/core/instance/init.ts index 91456c21..c38eb9f9 100644 --- a/src/core/instance/init.ts +++ b/src/core/instance/init.ts @@ -34,6 +34,9 @@ export function initMixin(Vue: typeof Component) { vm.__v_skip = true // effect scope vm._scope = new EffectScope(true /* detached */) + // #13134 edge case where a child component is manually created during the + // render of a parent component + vm._scope.parent = undefined vm._scope._vm = true // merge options if (options && options._isComponent) {