Skip to content

Cannot read property "term" of undefined #623

@NicolasOliveira861

Description

@NicolasOliveira861

When you enter a category page, like "https://{{account}}.myvtex.com/department/category", if the category isn't created yet, the page breaks and returns the error of the title while in dev workspace, when it should be returning the "Oops, not found" page. The error does not occur if you access only the department.

image

I think maybe the "params" from the useSearchPage context is returned as undefined for some reason, and the code can't destructure "term" from "undefined", giving the error.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions