Skip to content

SelectMenu: cannot read property of null #1421

@foxted

Description

@foxted

Environment

Version

v2.14.1

Reproduction

https://stackblitz.com/edit/nuxt-ui-4bk2ee

Description

Using Select Menu with a default value of null or undefined is now broken. That's a common use-case for this type of field. It was broken with this recent commit: b9fe74b. The error seems to be coming from here: https://github.com/nuxt/ui/blame/dev/src/runtime/components/forms/SelectMenu.vue#L370. We might want to add a null check in there.

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions