File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 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) {
6767 ( ! this . isLiteral || this . _isDynamicLiteral ) &&
6868 ! this . _checkStatement ( )
6969 ) {
70- // use raw expression as identifier because filters
71- // make them different watchers
72- var watcher = this . vm . _watchers [ this . raw ]
7370 // wrapped updater for context
7471 var dir = this
7572 var update = this . _update = function ( val , oldVal ) {
7673 if ( ! dir . _locked ) {
7774 dir . update ( val , oldVal )
7875 }
7976 }
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' ) {
8184 watcher = this . vm . _watchers [ this . raw ] = new Watcher (
8285 this . vm ,
8386 this . _watcherExp ,
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ module.exports = {
1818 // uid as a cache identifier
1919 this . id = '__v_repeat_' + ( ++ uid )
2020 // 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`)
2223 if ( ! this . filters ) {
2324 this . filters = { }
2425 }
You can’t perform that action at this time.
0 commit comments