fix(isArrayLike): correctly handle string primitives

Closes #3356
This commit is contained in:
Daniel Luz
2013-08-22 16:44:24 -03:00
committed by Brian Ford
parent fc8034b352
commit 5b8c78843e
2 changed files with 12 additions and 6 deletions

View File

@@ -461,6 +461,13 @@ describe('angular', function() {
expect(log).toEqual(['0:a', '1:b', '2:c']);
});
it('should handle string values like arrays', function() {
var log = [];
forEach('bar', function(value, key) { log.push(key + ':' + value)});
expect(log).toEqual(['0:b', '1:a', '2:r']);
});
it('should handle objects with length property as objects', function() {
var obj = {