فهرست منبع

fix getReadlChild types

Evan You 9 سال پیش
والد
کامیت
b6d386b070
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/core/vdom/helpers.js

+ 2 - 2
src/core/vdom/helpers.js

@@ -64,10 +64,10 @@ function applyNS (vnode, ns) {
 
 // in case the child is also an abstract component, e.g. <transition-control>
 // we want to recrusively retrieve the real component to be rendered
-export function getRealChild (vnode) {
+export function getRealChild (vnode: ?VNode): ?VNode {
   const compOptions = vnode && vnode.componentOptions
   if (compOptions && compOptions.Ctor.options._abstract) {
-    return getRealChild(compOptions.propsData.child)
+    return getRealChild(compOptions.propsData && compOptions.propsData.child)
   } else {
     return vnode
   }