From fc459f89cf929659fb03c938737a712cca8a7978 Mon Sep 17 00:00:00 2001 From: Minojhini Valaiyapathi Date: Tue, 6 May 2025 14:27:06 -0400 Subject: [PATCH] CASH-535 - Added null check --- src/layouts/quote/quote.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index c4ae1ff4c..57c0178e3 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -791,7 +791,7 @@ export default { const availablePackageNames = this.$refs.servicePackage?.servicePackageAnswers; var priceLabel = ""; - if (availablePackageNames.length > 1 || availablePackageNames.length == 1) { + if (availablePackageNames?.length > 1 || availablePackageNames?.length == 1) { var tier = availablePackageNames[0]; if (tier) { let lineItemsToPrice = this.availableLineItems; @@ -820,8 +820,8 @@ export default { priceLabel = price.toFixed(2); } } - const subTotalLabel = this.Variables.CASH_SUBTOTAL; - this.pushVariableToDataLayer({ [subTotalLabel]: priceLabel }); + const subTotalLabel = this.Variables?.CASH_SUBTOTAL; + this.pushVariableToDataLayer?.({ [subTotalLabel]: priceLabel }); }); }, async skip(insuranceSelection, packageSelection) {