Slight logic refactor

This commit is contained in:
Chloe Herd 2023-07-25 11:55:14 -04:00
parent 0fa12ca01c
commit 9c417e1c1b

View file

@ -25,12 +25,7 @@ export default {
},
computed: {
displayContent() {
let linesToDisplay = [];
if (this.hasWindshieldDamage) {
linesToDisplay.push(this.windshieldString);
}
return linesToDisplay;
return [...this.windshieldCopy];
},
hasWindshieldDamage() {
return (
@ -40,8 +35,12 @@ export default {
)
);
},
windshieldString() {
return this.getCmsContent("WindshieldDamageWidget", "Text");
windshieldCopy() {
if (this.hasWindshieldDamage) {
return [this.getCmsContent("WindshieldDamageWidget", "Text")];
} else {
return [];
}
},
},
components: {