jonathanpmartins / v-money3

Vue3 currency input/directive mask
MIT License
103 stars 27 forks source link

Error with null value #19

Closed botura closed 3 years ago

botura commented 3 years ago

Null value throws an error.

https://codesandbox.io/s/v-money3-use-as-component-forked-y2qs4?file=/src/App.vue

It would be nice if the component could accept it.

jonathanpmartins commented 3 years ago

Please update to the latest 3.13.8 version to get the fix. It will not return null as you tried in your code, instead, it will check null and convert it to 0 (zero).

If you want an empty input do set allow-blank to true. example

Thank you for reporting this issue.