@@ -15,6 +15,7 @@ var transition = require('../transition')
15
15
function Fragment ( linker , vm , frag , host , scope , parentFrag ) {
16
16
this . children = [ ]
17
17
this . childFrags = [ ]
18
+ this . vm = vm
18
19
this . scope = scope
19
20
this . inserted = false
20
21
this . parentFrag = parentFrag
@@ -77,7 +78,7 @@ function singleBefore (target, trans) {
77
78
var method = trans !== false
78
79
? transition . before
79
80
: _ . before
80
- method ( this . node , target , this . scope )
81
+ method ( this . node , target , this . vm )
81
82
this . inserted = true
82
83
if ( _ . inDoc ( this . node ) ) {
83
84
this . callHook ( attach )
@@ -90,7 +91,7 @@ function singleBefore (target, trans) {
90
91
91
92
function singleRemove ( ) {
92
93
var shouldCallRemove = _ . inDoc ( this . node )
93
- transition . remove ( this . node , this . scope )
94
+ transition . remove ( this . node , this . vm )
94
95
this . inserted = false
95
96
if ( shouldCallRemove ) {
96
97
this . callHook ( detach )
@@ -107,12 +108,12 @@ function singleRemove () {
107
108
function multiBefore ( target , trans ) {
108
109
_ . before ( this . node , target )
109
110
var nodes = this . nodes
110
- var scope = this . scope
111
+ var vm = this . vm
111
112
var method = trans !== false
112
113
? transition . before
113
114
: _ . before
114
115
for ( var i = 0 , l = nodes . length ; i < l ; i ++ ) {
115
- method ( nodes [ i ] , target , scope )
116
+ method ( nodes [ i ] , target , vm )
116
117
}
117
118
_ . before ( this . end , target )
118
119
this . inserted = true
@@ -130,12 +131,12 @@ function multiRemove () {
130
131
var parent = this . node . parentNode
131
132
var node = this . node . nextSibling
132
133
var nodes = this . nodes = [ ]
133
- var scope = this . scope
134
+ var vm = this . vm
134
135
var next
135
136
while ( node !== this . end ) {
136
137
nodes . push ( node )
137
138
next = node . nextSibling
138
- transition . remove ( node , scope )
139
+ transition . remove ( node , vm )
139
140
node = next
140
141
}
141
142
parent . removeChild ( this . node )
0 commit comments