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"); },