File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ var _ = require('../util')
14
14
exports . $addChild = function ( opts , BaseCtor ) {
15
15
BaseCtor = BaseCtor || _ . Vue
16
16
opts = opts || { }
17
- var parent = this
18
17
var ChildVue
18
+ var parent = this
19
+ // transclusion context
20
+ var context = opts . _context || parent
19
21
var inherit = opts . inherit !== undefined
20
22
? opts . inherit
21
23
: BaseCtor . options . inherit
22
24
if ( inherit ) {
23
- var ctors = parent . _childCtors
25
+ var ctors = context . _childCtors
24
26
ChildVue = ctors [ BaseCtor . cid ]
25
27
if ( ! ChildVue ) {
26
28
var optionName = BaseCtor . options . name
@@ -34,9 +36,7 @@ exports.$addChild = function (opts, BaseCtor) {
34
36
) ( )
35
37
ChildVue . options = BaseCtor . options
36
38
ChildVue . linker = BaseCtor . linker
37
- // important: transcluded inline repeaters should
38
- // inherit from outer scope rather than host
39
- ChildVue . prototype = opts . _context || this
39
+ ChildVue . prototype = context
40
40
ctors [ BaseCtor . cid ] = ChildVue
41
41
}
42
42
} else {
You can’t perform that action at this time.
0 commit comments