Skip to content

Consistent usage of Array.isArray()#105

Merged
geek merged 1 commit intohapijs:masterfrom
dacbd:master
Jul 19, 2013
Merged

Consistent usage of Array.isArray()#105
geek merged 1 commit intohapijs:masterfrom
dacbd:master

Conversation

@dacbd
Copy link
Contributor

@dacbd dacbd commented Jul 19, 2013

Parts of the code base where still using instanceof Array and parts where using Array.isArray(). Switched all the found cases to Array.isArray() which is faster for v8 and instanceof Array only checks to left hand inheritance chain to see if the object was made with the Array constructor, this could cause failure in edge cases and when used with the vm module.

@dacbd
Copy link
Contributor Author

dacbd commented Jul 19, 2013

tests pass

geek added a commit that referenced this pull request Jul 19, 2013
Consistent usage of Array.isArray()
@geek geek merged commit c558cf4 into hapijs:master Jul 19, 2013
@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants