Explorar o código

feat(compiler): compile suspense children as slots (#419)

Dmitry Sharshakov %!s(int64=6) %!d(string=hai) anos
pai
achega
4b9483fd5e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/compiler-core/src/transforms/transformElement.ts

+ 1 - 1
packages/compiler-core/src/transforms/transformElement.ts

@@ -120,7 +120,7 @@ export const transformElement: NodeTransform = (node, context) => {
       if (!hasProps) {
         args.push(`null`)
       }
-      if (isComponent) {
+      if (isComponent || node.tagType === ElementTypes.SUSPENSE) {
         const { slots, hasDynamicSlots } = buildSlots(node, context)
         args.push(slots)
         if (hasDynamicSlots) {