Merge pull request #2842 from brkcvn/master

Javascript console error fixed
This commit is contained in:
Burak Civan 2022-12-21 10:21:22 +03:00 committed by GitHub
commit 0435fa4f61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,