File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -67,17 +67,20 @@ p._bind = function (def) {
67
67
( ! this . isLiteral || this . _isDynamicLiteral ) &&
68
68
! this . _checkStatement ( )
69
69
) {
70
- // use raw expression as identifier because filters
71
- // make them different watchers
72
- var watcher = this . vm . _watchers [ this . raw ]
73
70
// wrapped updater for context
74
71
var dir = this
75
72
var update = this . _update = function ( val , oldVal ) {
76
73
if ( ! dir . _locked ) {
77
74
dir . update ( val , oldVal )
78
75
}
79
76
}
80
- if ( ! watcher ) {
77
+ // use raw expression as identifier because filters
78
+ // make them different watchers
79
+ var watcher = this . vm . _watchers [ this . raw ]
80
+ // v-repeat always creates a new watcher because it has
81
+ // a special filter that's bound to its directive
82
+ // instance.
83
+ if ( ! watcher || this . name === 'repeat' ) {
81
84
watcher = this . vm . _watchers [ this . raw ] = new Watcher (
82
85
this . vm ,
83
86
this . _watcherExp ,
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ module.exports = {
18
18
// uid as a cache identifier
19
19
this . id = '__v_repeat_' + ( ++ uid )
20
20
// we need to insert the objToArray converter
21
- // as the first read filter.
21
+ // as the first read filter, because it has to be invoked
22
+ // before any user filters. (can't do it in `update`)
22
23
if ( ! this . filters ) {
23
24
this . filters = { }
24
25
}
You can’t perform that action at this time.
0 commit comments