Skip to content

Arrays need the object prototype too. #67

Closed
gregnorth wants to merge 2 commits into
tj:masterfrom
gregnorth:master
Closed

Arrays need the object prototype too. #67
gregnorth wants to merge 2 commits into
tj:masterfrom
gregnorth:master

Conversation

@gregnorth
Copy link
Copy Markdown

Found that the array's object prototype was missing and caused a "Cannot convert object to primitive value" type error when trying to use arr.toString() or isNaN(arr).

Came about this when trying to evaluate arrays in a querystring after attempting and upgrade of express v.3.2.0 to v3.2.5.

Cheers.

gregnorth and others added 2 commits May 27, 2013 05:09
Found that the array's object prototype was missing and caused a "Cannot convert object to primitive value" type error when trying to use arr.toString() or isNaN(arr).
@bhcleek
Copy link
Copy Markdown

bhcleek commented Aug 8, 2013

687038a solves the problem of objects stored in arrays causing

arr[0] instanceof Object

to return false.

@gregnorth gregnorth closed this Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants