Просмотр исходного кода

fix: ensure vnode anchor is removed only if it exists

daiwei 8 месяцев назад
Родитель
Сommit
593d4f3adc
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/runtime-vapor/src/vdomInterop.ts

+ 1 - 1
packages/runtime-vapor/src/vdomInterop.ts

@@ -142,7 +142,7 @@ const vaporInteropImpl: Omit<
     } else if (vnode.vb) {
       remove(vnode.vb, container)
     }
-    remove(vnode.anchor as Node, container)
+    if (vnode.anchor) remove(vnode.anchor as Node, container)
   },
 
   /**