File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ module.exports = {
16
16
if ( inMatch ) {
17
17
var itMatch = inMatch [ 1 ] . match ( / \( ( .* ) , ( .* ) \) / )
18
18
if ( itMatch ) {
19
- this . iterator = itMatch [ 1 ]
20
- this . alias = itMatch [ 2 ]
19
+ this . iterator = itMatch [ 1 ] . trim ( )
20
+ this . alias = itMatch [ 2 ] . trim ( )
21
21
} else {
22
- this . alias = inMatch [ 1 ]
22
+ this . alias = inMatch [ 1 ] . trim ( )
23
23
}
24
24
this . _watcherExp = inMatch [ 2 ]
25
25
}
@@ -107,6 +107,7 @@ module.exports = {
107
107
var oldFrags = this . frags
108
108
var frags = this . frags = new Array ( data . length )
109
109
var alias = this . alias
110
+ var iterator = this . iterator
110
111
var start = this . start
111
112
var end = this . end
112
113
var inDoc = _ . inDoc ( start )
@@ -130,6 +131,9 @@ module.exports = {
130
131
// update $key
131
132
if ( key ) {
132
133
frag . scope . $key = key
134
+ if ( iterator ) {
135
+ frag . scope [ iterator ] = key
136
+ }
133
137
}
134
138
// update data for track-by, object repeat &
135
139
// primitive values.
You can’t perform that action at this time.
0 commit comments