Skip to content

Consistent usage of Array.isArray() #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2013
Merged

Consistent usage of Array.isArray() #105

merged 1 commit into from
Jul 19, 2013

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