You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
In fact this issue is not linked to the $resourcebut rather to the forEach implementation that has a special treatment for objects that have numerical length property. Have a look at his plunker: http://plnkr.co/edit/O7Z2f7aruxqiX26MfVgR?p=preview
I think that code must be changed from: else if (isObject(obj) && isNumber(obj.length)) { for (key = 0; key < obj.length; key++) iterator.call(context, obj[key], key); }
in else if (Array.isArray(obj) && isNumber(obj.length)) { for (key = 0; key < obj.length; key++) iterator.call(context, obj[key], key); }
at line 111 in angular.forEach
…like objects
fixesangular#1840
when an object has a numeric length property:
if an object has a length property with a number value of 0, it will
be considered like an array like object
if the value is positive and the object looks like a full dense array
with a property named as length minus one, it will be considered
like an array like object
Signed-off-by: Gonzalo Ruiz de Villa <[email protected]>
Should handle JQLite, jQuery, NodeList and other objects like arrays
but not other generic objects or instances of user defined types
with length property.
Closes#1840
i described the issue here https://groups.google.com/forum/?hl=en-US&fromgroups=#!topic/angular/FUNJZ8S6hIw
The text was updated successfully, but these errors were encountered: