From d8d06ac7f425acc45ea28dfdc3bfbfbb12df2854 Mon Sep 17 00:00:00 2001 From: Evan Barger Date: Wed, 1 Apr 2020 20:47:04 -0400 Subject: [PATCH] invalidate menu when uploading a new one, hide invalid text if menu not present --- index.html | 2 +- script/gbnp.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 8682ed2..e6ffa9b 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@

Menu is not loaded. Please upload a menu ROM.

-

+

Menu is not valid. Please upload a valid menu ROM.

diff --git a/script/gbnp.js b/script/gbnp.js index c3efa47..5555e06 100644 --- a/script/gbnp.js +++ b/script/gbnp.js @@ -48,6 +48,7 @@ class Menu { } setData(arrayBuffer) { + this._valid = null; this.data = new Uint8Array(arrayBuffer); if (this.valid()) { localStorage.setItem('menuData', JSON.stringify({ data: Array.from(this.data) }));