invalidate menu when uploading a new one, hide invalid text if menu not present

This commit is contained in:
Evan Barger
2020-04-01 20:47:04 -04:00
parent 7f6fc77b76
commit d8d06ac7f4
2 changed files with 2 additions and 1 deletions

View File

@@ -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) }));