@@ -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
@@ -73,7 +74,7 @@ function singleBefore (target, trans) {
73
74
var method = trans !== false
74
75
? transition . before
75
76
: _ . before
76
- method ( this . node , target , this . scope )
77
+ method ( this . node , target , this . vm )
77
78
this . inserted = true
78
79
if ( _ . inDoc ( this . node ) ) {
79
80
this . callHook ( attach )
@@ -86,7 +87,7 @@ function singleBefore (target, trans) {
86
87
87
88
function singleRemove ( ) {
88
89
var shouldCallRemove = _ . inDoc ( this . node )
89
- transition . remove ( this . node , this . scope )
90
+ transition . remove ( this . node , this . vm )
90
91
this . inserted = false
91
92
if ( shouldCallRemove ) {
92
93
this . callHook ( detach )
@@ -103,12 +104,12 @@ function singleRemove () {
103
104
function multiBefore ( target , trans ) {
104
105
_ . before ( this . node , target )
105
106
var nodes = this . nodes
106
- var scope = this . scope
107
+ var vm = this . vm
107
108
var method = trans !== false
108
109
? transition . before
109
110
: _ . before
110
111
for ( var i = 0 , l = nodes . length ; i < l ; i ++ ) {
111
- method ( nodes [ i ] , target , scope )
112
+ method ( nodes [ i ] , target , vm )
112
113
}
113
114
_ . before ( this . end , target )
114
115
this . inserted = true
@@ -126,12 +127,12 @@ function multiRemove () {
126
127
var parent = this . node . parentNode
127
128
var node = this . node . nextSibling
128
129
var nodes = this . nodes = [ ]
129
- var scope = this . scope
130
+ var vm = this . vm
130
131
var next
131
132
while ( node !== this . end ) {
132
133
nodes . push ( node )
133
134
next = node . nextSibling
134
- transition . remove ( node , scope )
135
+ transition . remove ( node , vm )
135
136
node = next
136
137
}
137
138
parent . removeChild ( this . node )
0 commit comments