From: Jian Zhang Date: Mon, 29 Jun 2020 22:52:44 +0000 (+0800) Subject: chore: avoid unnecessary function call (#1464) X-Git-Tag: v3.0.0-beta.17~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0017caf68b54284f449a08b321eb162090fce591;p=thirdparty%2Fvuejs%2Fcore.git chore: avoid unnecessary function call (#1464) --- diff --git a/packages/runtime-core/src/components/BaseTransition.ts b/packages/runtime-core/src/components/BaseTransition.ts index b1ee5da685..104fe09771 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) {