diff --git a/components/conceptHeader.vue b/components/conceptHeader.vue index 661633e..4d40716 100644 --- a/components/conceptHeader.vue +++ b/components/conceptHeader.vue @@ -7,8 +7,12 @@ const userStore = useUserStore(); const lobbyStore = useLobbyStore(); const currentGames = computed(() => { + const self = userStore.self; + if (!self) { + return []; + } const games = Object.values(lobbyStore.games).filter((g) => - g.players.some((p) => p.user.id == userStore.self?.id) + g.players.some((p) => p.userId == self.id) ); return games; }); diff --git a/components/lobby/game.vue b/components/lobby/game.vue index 9db9f90..7614696 100644 --- a/components/lobby/game.vue +++ b/components/lobby/game.vue @@ -17,7 +17,12 @@ const game = lobbyStore.games[props.id];