From bdc9b5c6a2f3fef2172c81e382833108ac7039cf Mon Sep 17 00:00:00 2001 From: Steffen Date: Wed, 27 May 2020 21:46:37 +0200 Subject: [PATCH] fixed setting bluffs in spectator session (fixes #16) --- src/components/TownSquare.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/TownSquare.vue b/src/components/TownSquare.vue index b44ecb7..1d75313 100644 --- a/src/components/TownSquare.vue +++ b/src/components/TownSquare.vue @@ -86,7 +86,8 @@ export default { }, openRoleModal(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.$store.commit("toggleModal", "role"); },