File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,14 @@ module.exports = {
265
265
primitive = ! isObject ( raw )
266
266
vm = ! init && this . getVm ( raw , i , converted ? obj . $key : null )
267
267
if ( vm ) { // reusable instance
268
+
269
+ if ( process . env . NODE_ENV !== 'production' && vm . _reused ) {
270
+ _ . warn (
271
+ 'Duplicate objects found in v-repeat="' + this . expression + '": ' +
272
+ JSON . stringify ( raw )
273
+ )
274
+ }
275
+
268
276
vm . _reused = true
269
277
vm . $index = i // update $index
270
278
// update data for track-by or object repeat,
@@ -462,7 +470,7 @@ module.exports = {
462
470
cache [ id ] = vm
463
471
} else if ( ! primitive && idKey !== '$index' ) {
464
472
process . env . NODE_ENV !== 'production' && _ . warn (
465
- 'Duplicate track-by key in v-repeat: ' + id
473
+ 'Duplicate objects with the same track-by key in v-repeat: ' + id
466
474
)
467
475
}
468
476
} else {
@@ -472,8 +480,8 @@ module.exports = {
472
480
data [ id ] = vm
473
481
} else {
474
482
process . env . NODE_ENV !== 'production' && _ . warn (
475
- 'Duplicate objects are not supported in v-repeat ' +
476
- 'when using components or transitions.'
483
+ 'Duplicate objects found in v-repeat="' + this . expression + '": ' +
484
+ JSON . stringify ( data )
477
485
)
478
486
}
479
487
} else {
You can’t perform that action at this time.
0 commit comments