From 0017caf68b54284f449a08b321eb162090fce591 Mon Sep 17 00:00:00 2001 From: Jian Zhang Date: Tue, 30 Jun 2020 06:52:44 +0800 Subject: [PATCH] chore: avoid unnecessary function call (#1464) --- packages/runtime-core/src/components/BaseTransition.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/components/BaseTransition.ts b/packages/runtime-core/src/components/BaseTransition.ts index b1ee5da6..104fe097 100644 --- a/packages/runtime-core/src/components/BaseTransition.ts +++ b/packages/runtime-core/src/components/BaseTransition.ts @@ -136,8 +136,8 @@ const BaseTransitionImpl = { const state = useTransitionState() return () => { - const children = getTransitionRawChildren( - slots.default ? slots.default() : [], + const children = slots.default && getTransitionRawChildren( + slots.default(), true ) if (!children || !children.length) {