Skip to content

fix: TypeError: Cannot read properties of undefined (reading 'prototype') #924

Open
@anishjneoito

Description

@anishjneoito

I'm getting the following error after building the app. I'm getting only when i pass query param.
/api/role is working fine. But /api/role?type=1 is throwing below error

" TypeError: Cannot read properties of undefined (reading 'prototype') at ActionParameterHandler.normalizeParamValue)

My code is below. I've emitDecoratorMetadata": true in tsconfig compilerOptions as well.
@Get('/role')
async getRole(@QueryParams() query: any) {
console.log(query.type)
}
Did I miss anything?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageIssues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions