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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,8 +136,8 @@ const BaseTransitionImpl = {
const state = useTransitionState() const state = useTransitionState()
return () => { return () => {
const children = getTransitionRawChildren( const children = slots.default && getTransitionRawChildren(
slots.default ? slots.default() : [], slots.default(),
true true
) )
if (!children || !children.length) { if (!children || !children.length) {