Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(Angular.js): Improve logic powering isArrayLike() #2878

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ function isArrayLike(obj) {
return obj instanceof JQLite || // JQLite
(jQuery && obj instanceof jQuery) || // jQuery
toString.call(obj) !== '[object Object]' || // some browser native object
typeof obj.callee === 'function'; // arguments (on IE8 looks like regular obj)
typeof obj.callee === 'function' || // arguments (on IE8 looks like regular obj)
obj.constructor === [].constructor; // various one-off objects (like subclasses) of array
}
}

Expand Down