From 2b48d8355f98aeb7ae07665c91ee13fbfde88955 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Wed, 21 Dec 2022 10:20:09 +0300 Subject: [PATCH] reading id console error fixed --- resources/assets/js/views/common/documents.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/resources/assets/js/views/common/documents.js b/resources/assets/js/views/common/documents.js index 339a198b5..3273117ff 100644 --- a/resources/assets/js/views/common/documents.js +++ b/resources/assets/js/views/common/documents.js @@ -464,20 +464,18 @@ const app = new Vue({ }, onSelectedTax(item_index) { - if (! this.tax_id) { + if (! this.tax_id || this.tax_id == '') { return; } let selected_tax; - - if (this.dynamic_taxes.length) { - this.dynamic_taxes.forEach(function(tax) { - if (tax.id == this.tax_id) { - selected_tax = tax; - } - }, this); - } - + + this.dynamic_taxes.forEach(function(tax) { + if (tax.id == this.tax_id) { + selected_tax = tax; + } + }, this); + this.items[item_index].tax_ids.push({ id: selected_tax.id, name: selected_tax.title,