From b1b2344be614fdb8e6bb9184a15feba32c116c66 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Thu, 15 Dec 2022 10:12:02 +0300 Subject: [PATCH] console error fixed --- resources/assets/js/views/common/documents.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/assets/js/views/common/documents.js b/resources/assets/js/views/common/documents.js index 65d6cde05..339a198b5 100644 --- a/resources/assets/js/views/common/documents.js +++ b/resources/assets/js/views/common/documents.js @@ -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(',', '.') : '';