Skip to content

Express 5 | TypeError: obj.hasOwnProperty is not a function #11

@itsTeknas

Description

@itsTeknas

Started getting this error after upgrading to express 5

TypeError: obj.hasOwnProperty is not a function
    at parseObject (/Users/Sanket/Workspace/X/node_modules/express-query-boolean/lib/parse.js:60:13)
    at /Users/Sanket/Workspace/X/node_modules/express-query-boolean/index.js:5:17

Maybe it's linked to this
https://expressjs.com/en/guide/migrating-5.html#req.query

req.query
The req.query property is no longer a writable property and is instead a getter. The default query parser has been changed from “extended” to “simple”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions