From 26f70eee84024ee170c6142e62fa08b1616ef6e3 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Tue, 18 Feb 2020 20:33:28 +0100
Subject: [PATCH] Patch to Hall to observe opponents through 'social' modal
 although game is not in the page

---
 client/src/views/Hall.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue
index b4869c9c..1b8681fd 100644
--- a/client/src/views/Hall.vue
+++ b/client/src/views/Hall.vue
@@ -342,7 +342,9 @@ export default {
           if (matchGid) gids.push(matchGid[0]);
         });
         const gid = gids[Math.floor(Math.random() * gids.length)];
-        this.showGame(this.games.find(g => g.id == gid));
+        const game = this.games.find(g => g.id == gid);
+        if (game) this.showGame(game);
+        else this.$router.push("/game/" + gid); //game vs. me
       }
     },
     showGame: function(g) {
-- 
2.44.0