From: daiwei Date: Wed, 17 Sep 2025 01:59:10 +0000 (+0800) Subject: fix(runtime-vapor): prevent insertion and scope Id setting during hydration X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd8680980664778794f9e7de5cf02a8fef986482;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-vapor): prevent insertion and scope Id setting during hydration --- diff --git a/packages/runtime-vapor/src/component.ts b/packages/runtime-vapor/src/component.ts index a60a24e112..9d4c5737f6 100644 --- a/packages/runtime-vapor/src/component.ts +++ b/packages/runtime-vapor/src/component.ts @@ -616,8 +616,10 @@ export function mountComponent( startMeasure(instance, `mount`) } if (instance.bm) invokeArrayFns(instance.bm) - insert(instance.block, parent, anchor) - setComponentScopeId(instance) + if (!isHydrating) { + insert(instance.block, parent, anchor) + setComponentScopeId(instance) + } if (instance.m) queuePostFlushCb(() => invokeArrayFns(instance.m!)) instance.isMounted = true if (__DEV__) {