Explorar o código

fix(runtime-core): fix default shapeFlag for fragments

Evan You %!s(int64=4) %!d(string=hai) anos
pai
achega
2a310df753
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/runtime-core/src/vnode.ts

+ 1 - 1
packages/runtime-core/src/vnode.ts

@@ -394,7 +394,7 @@ function createBaseVNode(
   children: unknown = null,
   patchFlag = 0,
   dynamicProps: string[] | null = null,
-  shapeFlag = ShapeFlags.ELEMENT,
+  shapeFlag = type === Fragment ? 0 : ShapeFlags.ELEMENT,
   isBlockNode = false,
   needFullChildrenNormalization = false
 ) {