chore: avoid unnecessary function call (#1464)

This commit is contained in:
Jian Zhang
2020-06-30 06:52:44 +08:00
committed by GitHub
parent c269800631
commit 0017caf68b

View File

@@ -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) {