Skip to content

request.query.hasOwnProperty causes "hasOwnProperty is not a function" error #3280

@ghost

Description

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 request is 'object', so I'm not sure why this method is missing or why calling it from Object works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    non issueIssue is not a problem or requires changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions