From 1060b6e82b10e03126c498d8225e7859944efaa0 Mon Sep 17 00:00:00 2001 From: ZeroGwafa Date: Tue, 8 Oct 2024 11:55:11 -0400 Subject: [PATCH] - Update Artifact Calc to work with recent changes --- scripts/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/script.js b/scripts/script.js index a37765c..26d4961 100644 --- a/scripts/script.js +++ b/scripts/script.js @@ -514,9 +514,11 @@ window.setTimeout(function () { localStorage.removeItem("tempMaterials"); } var mats = JSON.parse(storageEvent.newValue); - JSON.parse(localStorage.archMats).forEach((mat, i) => { + const curMats = JSON.parse(localStorage.archMats); + curMats.forEach((mat, i) => { mat.goal = parseInt(mats[mat.name]); }); + localStorage.archMats = JSON.stringify(curMats); buildTable(); } }