Skip to content

Commit 4be940b

Browse files
fix(ngRepeat): support cyclic object references in error messages
Now that `minErr` can cope with objects that cannot be normally stringified to JSON, just pass the error arguments straight through without trying to stringify them first. Closes angular#9838 Closes angular#10065
1 parent 8a6003a commit 4be940b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/directive/ngRepeat.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
366366
});
367367
throw ngRepeatMinErr('dupes',
368368
"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",
369-
expression, trackById, toJson(value));
369+
expression, trackById, value);
370370
} else {
371371
// new never before seen block
372372
nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};

0 commit comments

Comments
 (0)