console error fixed

This commit is contained in:
Burak Civan 2022-12-15 10:12:02 +03:00
parent c6ab5601b1
commit b1b2344be6

View File

@ -816,6 +816,10 @@ const app = new Vue({
watch: {
'form.discount': function (newVal, oldVal) {
if (typeof newVal !== 'string') {
return;
}
if (newVal != '' && newVal.search('^[-+]?([0-9]|[1-9][0-9]|100)*\.?[0-9]+$') !== 0) {
this.form.discount = oldVal;
this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';