From 4f07d54fac76da08cc40d5742dd359b672c162d8 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sat, 10 Apr 2021 18:34:33 +0200
Subject: [PATCH] Patch local + imported games on MyGames page

---
 client/src/views/MyGames.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/client/src/views/MyGames.vue b/client/src/views/MyGames.vue
index 3d86636f..d30f5112 100644
--- a/client/src/views/MyGames.vue
+++ b/client/src/views/MyGames.vue
@@ -384,7 +384,10 @@ export default {
           if (L > 0) {
             // Add "-1" because IDBKeyRange.upperBound includes boundary
             this.cursor["live"] = localGames[L - 1].created - 1;
-            localGames.forEach(g => g.type = "live");
+            localGames.forEach(g => {
+              g.type = "live";
+              if (!g.options) g.options = {}; //TODO: remove patch
+            });
             this.decorate(localGames);
             this.liveGames = this.liveGames.concat(localGames);
           }
@@ -400,6 +403,7 @@ export default {
             this.cursor["import"] = importGames[L - 1].created - 1;
             importGames.forEach(g => {
               g.type = "import";
+              if (!g.options) g.options = {}; //TODO: remove patch
               this.setVname(g);
             });
             this.importGames = this.importGames.concat(importGames);
-- 
2.44.0