diff options
| author | Misko Hevery | 2010-07-09 14:45:29 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-07-09 14:45:29 -0700 |
| commit | 228b54aa2ea9c5faf9280f39317fdf07b2d49580 (patch) | |
| tree | 58c3b8afcd6b5bb9b3f54b68679e507e62dba59e /src/directives.js | |
| parent | 00bb79039251ca6e4622df677fe4894552774bd5 (diff) | |
| download | angular.js-228b54aa2ea9c5faf9280f39317fdf07b2d49580.tar.bz2 | |
ng:repeat ignores prototype keys
Diffstat (limited to 'src/directives.js')
| -rw-r--r-- | src/directives.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/directives.js b/src/directives.js index 1b422331..a333c4c4 100644 --- a/src/directives.js +++ b/src/directives.js @@ -162,8 +162,9 @@ angularWidget("@ng:repeat", function(expression, element){ var children = [], currentScope = this; this.$onEval(function(){ var index = 0, childCount = children.length, childScope, lastElement = reference, - collection = this.$tryEval(rhs, reference); + collection = this.$tryEval(rhs, reference), is_array = isArray(collection); for ( var key in collection) { + if (is_array && !collection.hasOwnProperty(key)) break; if (index < childCount) { // reuse existing child childScope = children[index]; |
