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

isArrayLike() breaks with string primitives #3713

Closed
mernen opened this issue Aug 23, 2013 · 2 comments
Closed

isArrayLike() breaks with string primitives #3713

mernen opened this issue Aug 23, 2013 · 2 comments

Comments

@mernen
Copy link
Contributor

mernen commented Aug 23, 2013

The isArrayLike test in 1.0 worked properly with any string values, returning true (since they can be indexed just like String objects and work with functions like Array.prototype.forEach). The new test in 1.2 (introduced by #3356) raises a TypeError, because the in operator cannot be used on a non-object.

@timraymond
Copy link
Contributor

@btford You can probably can close this issue—You mentioned that it was resolved here 5b8c788 on this PR #3714 .

@caitp
Copy link
Contributor

caitp commented Nov 2, 2013

Wasn't there another issue recently saying that isArrayLike was reporting false positives for anything with a 'length' property (IE string primitives)? #4751

@btford btford closed this as completed Nov 2, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants