CASH-535 - Added null check
This commit is contained in:
parent
168a948d04
commit
fc459f89cf
1 changed files with 3 additions and 3 deletions
|
|
@ -791,7 +791,7 @@ export default {
|
||||||
const availablePackageNames = this.$refs.servicePackage?.servicePackageAnswers;
|
const availablePackageNames = this.$refs.servicePackage?.servicePackageAnswers;
|
||||||
var priceLabel = "";
|
var priceLabel = "";
|
||||||
|
|
||||||
if (availablePackageNames.length > 1 || availablePackageNames.length == 1) {
|
if (availablePackageNames?.length > 1 || availablePackageNames?.length == 1) {
|
||||||
var tier = availablePackageNames[0];
|
var tier = availablePackageNames[0];
|
||||||
if (tier) {
|
if (tier) {
|
||||||
let lineItemsToPrice = this.availableLineItems;
|
let lineItemsToPrice = this.availableLineItems;
|
||||||
|
|
@ -820,8 +820,8 @@ export default {
|
||||||
priceLabel = price.toFixed(2);
|
priceLabel = price.toFixed(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const subTotalLabel = this.Variables.CASH_SUBTOTAL;
|
const subTotalLabel = this.Variables?.CASH_SUBTOTAL;
|
||||||
this.pushVariableToDataLayer({ [subTotalLabel]: priceLabel });
|
this.pushVariableToDataLayer?.({ [subTotalLabel]: priceLabel });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async skip(insuranceSelection, packageSelection) {
|
async skip(insuranceSelection, packageSelection) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue