Skip to content

[Bug Report][3.9.0] no decimalSeparator in useLocale() #324

@trydofor

Description

@trydofor

Environment

Vuetify Version: 3.9.0
Last working version: 3.8.12
Vue Version: 3.5.17
Browsers: Chrome 130.0.0.0
OS: Mac OS 10.15.7

Steps to reproduce

with the following code, there is error

<VNumberInput v-model="page" :max="5" :min="1" label="bug" />
"dependencies": {
  "vuetify": "3.9.0",
  "@nuxtjs/i18n": "9.5.6",
  "nuxt": "^3.17.7",
  "vuetify-nuxt-module": "0.18.7"
}

error

  VNumberInput.js?v=420295d3:80 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'value')
      at ComputedRefImpl.fn (VNumberInput.js?v=420295d3:80:103)
      at refreshComputed (reactivity.esm-bundler.js?v=420295d3:361:29)
      at get value (reactivity.esm-bundler.js?v=420295d3:1569:5)
      at correctPrecision (VNumberInput.js?v=420295d3:90:52)
      at VNumberInput.js?v=420295d3:104:28
      at callWithErrorHandling (runtime-core.esm-bundler.js?v=420295d3:197:19)
      at callWithAsyncErrorHandling (runtime-core.esm-bundler.js?v=420295d3:204:17)
      at baseWatchOptions.call (runtime-core.esm-bundler.js?v=420295d3:6273:47)
      at ReactiveEffect.getter [as fn] (reactivity.esm-bundler.js?v=420295d3:1700:25)
      at ReactiveEffect.run (reactivity.esm-bundler.js?v=420295d3:207:19)

the code is at Line 99, because decimalSeparatorFromLocale is undefined

https://github.com/vuetifyjs/vuetify/blob/a17b3d171e1bd78c78682d65b9edce093c66e707/packages/vuetify/src/components/VNumberInput/VNumberInput.tsx#L97-L99

Expected Behavior

no error if without decimal-separator

Actual Behavior

got error if no decimalSeparator

Reproduction Link

https://stackblitz.com/edit/nuxt-starter-bbucwfhd?file=app.vue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions