From: daiwei Date: Wed, 13 Aug 2025 08:40:20 +0000 (+0800) Subject: chore: remove unnecessary code X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d6520db2cc25f85486a3c41b0974e39a5b76412;p=thirdparty%2Fvuejs%2Fcore.git chore: remove unnecessary code --- diff --git a/packages/runtime-vapor/src/dom/hydration.ts b/packages/runtime-vapor/src/dom/hydration.ts index 389f9a95c6..469d1be453 100644 --- a/packages/runtime-vapor/src/dom/hydration.ts +++ b/packages/runtime-vapor/src/dom/hydration.ts @@ -70,8 +70,7 @@ function performHydration( } export function withHydration(container: ParentNode, fn: () => void): void { - // @ts-expect-error - const setup = () => setInsertionState(container, -1) + const setup = () => setInsertionState(container) const cleanup = () => resetInsertionState() return performHydration(fn, setup, cleanup) } @@ -138,11 +137,7 @@ function adoptTemplateImpl(node: Node, template: string): Node | null { function locateHydrationNodeImpl(): void { let node: Node | null - // @ts-expect-error - if (insertionAnchor === -1) { - // firstChild - node = _child(insertionParent!)! - } else if (insertionAnchor === 0) { + if (insertionAnchor === 0) { // prepend node = insertionParent!.$pa = locateHydrationNodeByAnchor( insertionParent!.$pa || _child(insertionParent!),