add null checks

This commit is contained in:
Katie Kroell 2023-07-25 16:58:37 -04:00
parent 14517035b1
commit 3026d929fb

View file

@ -198,7 +198,7 @@ export default {
},
verifiedITACAlertBody() {
return this.getCmsContent('VerifiedITACAlert',
'BodyText').replaceAll('{custom:costSavings}', this.costSavings);
'BodyText')?.replaceAll('{custom:costSavings}', this.costSavings);
},
coverageStatementSubHeader() {
const subheader = this.getSubheaderTextFromCms('SiteSubHeaderWidget');
@ -217,17 +217,17 @@ export default {
return header;
},
nextStepsBody() {
const body = this.getBodyTextFromCms('NextStepsWidget').replaceAll('{custom:damage}', this.damageText);
const body = this.getBodyTextFromCms('NextStepsWidget')?.replaceAll('{custom:damage}', this.damageText);
return body;
},
continueWithSchedulingBodyText() {
return this.getCmsContent('continueWithSchedulingCopy', 'BodyText');
},
unverifiedADASNextStepsBodyText() {
return this.getCmsContent('UnverifiedADASNextStepsWidget', 'BodyText').replaceAll('{custom:damage}', this.damageText);
return this.getCmsContent('UnverifiedADASNextStepsWidget', 'BodyText')?.replaceAll('{custom:damage}', this.damageText);
},
unverifiedNonADASNextStepsBodyText() {
return this.getCmsContent('UnverifiedNonADASNextStepsWidget', 'BodyText').replaceAll('{custom:damage}', this.damageText);
return this.getCmsContent('UnverifiedNonADASNextStepsWidget', 'BodyText')?.replaceAll('{custom:damage}', this.damageText);
},
unverifiedNonADASRepairBodyText() {
return this.getCmsContent('UnverifiedNonADASRepairWidget', 'BodyText');