File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ declare interface Component {
25
25
$children: Array < Component > ;
26
26
$refs: { [ key : string ] : Component | Element | Array < Component | Element > | void } ;
27
27
$slots: { [ key : string ] : Array < VNode > } ;
28
- $scopedSlots: ? { [ key : string ] : ( ) => VNodeChildren } ;
28
+ $scopedSlots: { [ key : string ] : ( ) => VNodeChildren } ;
29
29
$vnode: VNode ;
30
30
$isServer: boolean ;
31
31
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export function initRender (vm: Component) {
16
16
vm . _staticTrees = null
17
17
vm . _renderContext = vm . $options . _parentVnode && vm . $options . _parentVnode . context
18
18
vm . $slots = resolveSlots ( vm . $options . _renderChildren , vm . _renderContext )
19
- vm . $scopedSlots = null
19
+ vm . $scopedSlots = { }
20
20
// bind the public createElement fn to this instance
21
21
// so that we get proper render context inside it.
22
22
vm . $createElement = bind ( createElement , vm )
@@ -45,7 +45,7 @@ export function renderMixin (Vue: Class<Component>) {
45
45
}
46
46
}
47
47
48
- if ( _parentVnode ) {
48
+ if ( _parentVnode && _parentVnode . data . scopedSlots ) {
49
49
vm . $scopedSlots = _parentVnode . data . scopedSlots
50
50
}
51
51
@@ -191,7 +191,7 @@ export function renderMixin (Vue: Class<Component>) {
191
191
fallback : ?Array < VNode > ,
192
192
props : ?Object
193
193
) : ?Array < VNode > {
194
- const scopedSlotFn = this . $scopedSlots && this . $scopedSlots [ name ]
194
+ const scopedSlotFn = this . $scopedSlots [ name ]
195
195
if ( scopedSlotFn ) { // scoped slot
196
196
return scopedSlotFn ( props || { } ) || fallback
197
197
} else {
You can’t perform that action at this time.
0 commit comments