Explorar el Código

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

Evan You hace 4 años
padre
commit
2a310df753
Se han modificado 1 ficheros con 1 adiciones y 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
 ) {