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) {