fix bug with null history
fix bug with null history
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