fix bug with null history

Chris Pollett [2023-02-01 07:Feb:st]
fix bug with null history
Filename
js/game.js
diff --git a/js/game.js b/js/game.js
index 1ec6371..96fb70c 100644
--- a/js/game.js
+++ b/js/game.js
@@ -1059,8 +1059,11 @@ class Game
     {
         this.history = [];
         this.future_history = [];
-        elt('next-history').disabled = true;
-        elt('previous-history').disabled = true;
+        let next_history_elt = elt('next-history');
+        if (next_history_elt) {
+            next_history_elt.disabled = true;
+            elt('previous-history').disabled = true;
+        }
     }
     /**
      * Function called when the left arrow button on the main nav page is
ViewGit