fixed setting bluffs in spectator session (fixes #16)

This commit is contained in:
Steffen 2020-05-27 21:46:37 +02:00
parent ca1c1113b2
commit bdc9b5c6a2
No known key found for this signature in database
GPG Key ID: 764D74E98267DFC6
1 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,8 @@ export default {
}, },
openRoleModal(playerIndex) { openRoleModal(playerIndex) {
const player = this.players[playerIndex]; const player = this.players[playerIndex];
if (this.session.isSpectator && player.role.team === "traveler") return; if (this.session.isSpectator && player && player.role.team === "traveler")
return;
this.selectedPlayer = playerIndex; this.selectedPlayer = playerIndex;
this.$store.commit("toggleModal", "role"); this.$store.commit("toggleModal", "role");
}, },