Slight logic refactor
This commit is contained in:
parent
0fa12ca01c
commit
9c417e1c1b
1 changed files with 7 additions and 8 deletions
|
|
@ -25,12 +25,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
displayContent() {
|
displayContent() {
|
||||||
let linesToDisplay = [];
|
return [...this.windshieldCopy];
|
||||||
if (this.hasWindshieldDamage) {
|
|
||||||
linesToDisplay.push(this.windshieldString);
|
|
||||||
}
|
|
||||||
|
|
||||||
return linesToDisplay;
|
|
||||||
},
|
},
|
||||||
hasWindshieldDamage() {
|
hasWindshieldDamage() {
|
||||||
return (
|
return (
|
||||||
|
|
@ -40,8 +35,12 @@ export default {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
windshieldString() {
|
windshieldCopy() {
|
||||||
return this.getCmsContent("WindshieldDamageWidget", "Text");
|
if (this.hasWindshieldDamage) {
|
||||||
|
return [this.getCmsContent("WindshieldDamageWidget", "Text")];
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue