Przeglądaj źródła

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

Evan You 4 lat temu
rodzic
commit
2a310df753
1 zmienionych plików z 1 dodań i 1 usunięć
  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
 ) {