Fix error on trying to see if the game has been won when there's not even an object chosen yet.
This commit is contained in:
parent
66ff888221
commit
fdd0b19a4c
1 changed files with 6 additions and 3 deletions
|
|
@ -67,9 +67,12 @@ export default {
|
|||
return this.$store.state.questions;
|
||||
},
|
||||
gameOver() {
|
||||
if (this.$store.state.chosen_object) {
|
||||
let targetAnswer = this.$store.state.chosen_object.toLowerCase()+`.`;
|
||||
return this.$store.state.answers.team_1.includes(targetAnswer)
|
||||
|| this.$store.state.answers.team_2.includes(targetAnswer);
|
||||
};
|
||||
return false;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue