From c15f5f57f96d87d8074d6f0fa651bf58f935b5f7 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 15 Dec 2022 22:17:32 +0100 Subject: [PATCH] Allow `null` to be loaded --- src/js/Game.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/Game.js b/src/js/Game.js index 8fc29f4..f5a8cf7 100644 --- a/src/js/Game.js +++ b/src/js/Game.js @@ -148,6 +148,12 @@ export class Game load(data) { this.setState([], data); + + if (!this.#state) + { + this.reset(); + } + this.draw(); }