]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: save
authordaiwei <daiwei521@126.com>
Thu, 31 Jul 2025 08:19:01 +0000 (16:19 +0800)
committerdaiwei <daiwei521@126.com>
Thu, 31 Jul 2025 08:19:01 +0000 (16:19 +0800)
packages/runtime-vapor/src/apiCreateFor.ts
packages/runtime-vapor/src/fragment.ts

index 5f3e9ea80ee4362d355ec36b6f7231daedd11377..13303a9b7c96c0b6a050227e24cbc87188430be9 100644 (file)
@@ -469,8 +469,10 @@ export const createFor = (
   if (!isHydrating && _insertionParent) {
     insert(frag, _insertionParent, _insertionAnchor)
   }
-  if (isHydrating && _insertionAnchor !== undefined) {
-    advanceHydrationNode(_insertionParent!)
+  if (isHydrating) {
+    advanceHydrationNode(
+      _insertionAnchor !== undefined ? _insertionParent! : parentAnchor,
+    )
   }
 
   return frag
index 59de26d08bcb2ead390858d9625b41d18e890343..b978298a6d7a5484d1ce4ec60c43584eef0a270d 100644 (file)
@@ -145,6 +145,8 @@ export class DynamicFragment extends VaporFragment {
   }
 
   hydrate(label: string, isEmpty: boolean = false): void {
+    if (!label && isEmpty) return
+
     // for `v-if="false"` the node will be an empty comment, use it as the anchor.
     // otherwise, find next sibling vapor fragment anchor
     if (label === 'if' && isEmpty) {