]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: avoid unnecessary function call (#1464)
authorJian Zhang <dsonet@msn.com>
Mon, 29 Jun 2020 22:52:44 +0000 (06:52 +0800)
committerGitHub <noreply@github.com>
Mon, 29 Jun 2020 22:52:44 +0000 (18:52 -0400)
packages/runtime-core/src/components/BaseTransition.ts

index b1ee5da685155bb4f456068d6849e02790621680..104fe097710060ef674c88c708fbbb9f5ac5c6a8 100644 (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) {