From 8c2f71294fdcf8451054b0b511004302e108b5d7 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Thu, 22 Oct 2020 14:43:58 -0600 Subject: [PATCH] Fix crash caused by last fix dammit (fixes #9) --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 34ba3af..13f5d4e 100644 --- a/js/main.js +++ b/js/main.js @@ -1785,7 +1785,7 @@ class Conductor { if (identifier !== null) { // TODO again, enforce something about the shape here this.current_pack_savefile = JSON.parse(window.localStorage.getItem(STORAGE_PACK_PREFIX + identifier)); - if (this.current_pack_savefile.total_score === null) { + if (this.current_pack_savefile && this.current_pack_savefile.total_score === null) { // Fix some NaNs that slipped in this.current_pack_savefile.total_score = this.current_pack_savefile.scorecards .map(scorecard => scorecard ? scorecard.score : 0)