From 4b9483fd5ec70dae07a20563168c3d1d4e95bfe5 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Mon, 4 Nov 2019 22:35:00 +0300 Subject: [PATCH] feat(compiler): compile suspense children as slots (#419) --- packages/compiler-core/src/transforms/transformElement.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-core/src/transforms/transformElement.ts b/packages/compiler-core/src/transforms/transformElement.ts index 9fba3d82..f348c8ce 100644 --- a/packages/compiler-core/src/transforms/transformElement.ts +++ b/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) {