Fix: Character cases causing interface not recognize the game end. (closes #47)
This commit is contained in:
parent
78d1d979de
commit
daa18d6a9a
2 changed files with 17 additions and 4 deletions
|
|
@ -13,7 +13,8 @@
|
|||
v-for="answerIndex in 8"
|
||||
:class="[
|
||||
`answer`,
|
||||
answers[`team_${3 - $store.state.team}`][answerIndex-1].toLowerCase() == $store.state.chosen_object+`.` ? `correct`: ``
|
||||
answers[`team_${3 - $store.state.team}`][answerIndex-1].toLowerCase() === getObject
|
||||
? `correct`: ``
|
||||
]"
|
||||
:key="`${otherTeamID}-answer-container-${answerIndex}`"
|
||||
>
|
||||
|
|
@ -57,7 +58,8 @@
|
|||
v-for="answerIndex in 8"
|
||||
:class="[
|
||||
`answer`,
|
||||
answers[`team_${$store.state.team}`][answerIndex-1].toLowerCase() == $store.state.chosen_object+`.` ? `correct`: ``
|
||||
answers[`team_${$store.state.team}`][answerIndex-1].toLowerCase() === getObject
|
||||
? `correct`: ``
|
||||
]"
|
||||
:key="`${teamID}-answer-container-${answerIndex}`"
|
||||
>
|
||||
|
|
@ -122,6 +124,12 @@ export default {
|
|||
answers() {
|
||||
return this.$store.state.answers;
|
||||
},
|
||||
getObject() {
|
||||
if (!this.$store.state.chosen_object) {
|
||||
return ``;
|
||||
};
|
||||
return this.$store.state.chosen_object.toLowerCase() + `.`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
isCorrect(team, answerIndex) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue