Merge pull request #2824 from brkcvn/master

Console error fixed
This commit is contained in:
Burak Civan 2022-12-15 10:13:41 +03:00 committed by GitHub
commit 13c06bb32e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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(',', '.') : '';