Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectMenu: cannot read property of null #1421

Closed
foxted opened this issue Feb 26, 2024 · 1 comment · May be fixed by SamandarTemirxodjayev/goshtbor#26, SamandarTemirxodjayev/goshtbor#28 or SamandarTemirxodjayev/goshtbor#29
Labels
bug Something isn't working

Comments

@foxted
Copy link

foxted commented Feb 26, 2024

Environment

  • Operating System: Darwin
  • Node Version: v20.9.0
  • Nuxt Version: 3.10.3
  • CLI Version: 3.10.1
  • Nitro Version: 2.8.1
  • Package Manager: npm@10.1.0
  • Builder: -
  • User Config: site, app, colorMode, imports, devtools, modules, runtimeConfig, ogImage, routeRules, security, supabase, tailwindcss, vite
  • Runtime Modules: @nuxtjs/supabase@1.1.6, @nuxt/ui@2.14.1, @pinia/nuxt@0.5.1, @nuxt/image@1.3.0, nuxt-og-image@2.2.4, nuxt-schema-org@3.3.4, @nuxt/content@2.12.0, nuxt-security@1.2.0
  • Build Modules: -

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

@foxted foxted added the bug Something isn't working label Feb 26, 2024
Copy link
Member

You're absolutely right! Thanks for the report 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants