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

Using a the "unit" number formatting throws an exception #750

Closed
simonjodet opened this issue Dec 10, 2019 · 1 comment · May be fixed by tt9133github/snyktest#7
Closed

Using a the "unit" number formatting throws an exception #750

simonjodet opened this issue Dec 10, 2019 · 1 comment · May be fixed by tt9133github/snyktest#7

Comments

@simonjodet
Copy link
Contributor

vue & vue-i18n version

ex: 2.6.10, 8.15.0

Reproduction Link

https://jsfiddle.net/qghvs0Lc/

Steps to reproduce

Use any unit style when formatting a number

What is Expected?

The number to be formatted.

What is actually happening?

An exception is thrown. The reason is that "unit" is not included numberFormatKeysand thus the unit option is stripped resulting in the exception below:

    at new NumberFormat (<anonymous>)
    at VueI18n._n (vue-i18n.js:1839)
    at VueI18n.n (vue-i18n.js:1895)
    at Proxy.eval (eval at createFunction (vue.js:11628), <anonymous>:1:69)
    at Vue._render (vue.js:3545)
    at Vue.updateComponent (vue.js:4061)
    at Watcher.get (vue.js:4472)
    at new Watcher (vue.js:4461)
    at mountComponent (vue.js:4068)
    at Vue.$mount (vue.js:9038)```
@simonjodet
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant