request.query.hasOwnProperty causes "hasOwnProperty is not a function" error #3280
Comments
jasnell
commented
Aug 3, 2016
|
This is expected. nodejs/node#6289 modified the |
jeremiahlee
commented
Aug 3, 2016
|
Thanks @jasnell. Closing issue. |
jeremiahlee
closed this
Aug 3, 2016
hueniverse
added the
non-issue
label
Aug 3, 2016
mauromereu
referenced
this issue
in silas/hapi-fields
Sep 22, 2016
Closed
request.query.hasOwnProperty is not a function #1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jeremiahlee commentedAug 3, 2016
I'm having a new issue with node v6.3.1 and hapi v14.1.0.
A handler function with
request.query.hasOwnProperty('whatever')will result in a "request.query.hasOwnProperty is not a function" error.Changing to
Object.prototype.hasOwnProperty.call(request.query, 'whatever')works.typeof requestis 'object', so I'm not sure why this method is missing or why calling it from Object works.