@@ -17,9 +17,10 @@ import { isUpdatingChildComponent } from './lifecycle'
1717
1818export function initRender ( vm : Component ) {
1919 vm . _vnode = null // the root of the child tree
20- const parentVnode = vm . $vnode = vm . $options . _parentVnode // the placeholder node in parent tree
20+ const options = vm . $options
21+ const parentVnode = vm . $vnode = options . _parentVnode // the placeholder node in parent tree
2122 const renderContext = parentVnode && parentVnode . context
22- vm . $slots = resolveSlots ( vm . $ options. _renderChildren , renderContext )
23+ vm . $slots = resolveSlots ( options . _renderChildren , renderContext )
2324 vm . $scopedSlots = emptyObject
2425 // bind the createElement fn to this instance
2526 // so that we get proper render context inside it.
@@ -39,12 +40,12 @@ export function initRender (vm: Component) {
3940 defineReactive ( vm , '$attrs' , parentData && parentData . attrs || emptyObject , ( ) => {
4041 ! isUpdatingChildComponent && warn ( `$attrs is readonly.` , vm )
4142 } , true )
42- defineReactive ( vm , '$listeners' , vm . $ options. _parentListeners || emptyObject , ( ) => {
43+ defineReactive ( vm , '$listeners' , options . _parentListeners || emptyObject , ( ) => {
4344 ! isUpdatingChildComponent && warn ( `$listeners is readonly.` , vm )
4445 } , true )
4546 } else {
4647 defineReactive ( vm , '$attrs' , parentData && parentData . attrs || emptyObject , null , true )
47- defineReactive ( vm , '$listeners' , vm . $ options. _parentListeners || emptyObject , null , true )
48+ defineReactive ( vm , '$listeners' , options . _parentListeners || emptyObject , null , true )
4849 }
4950}
5051
0 commit comments