Skip to content

Commit

Permalink
Fix scope issue for fetching materials
Browse files Browse the repository at this point in the history
  • Loading branch information
ExInferi committed Nov 7, 2024
1 parent 49faab5 commit c270f03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ async function getMatsfromWiki() {
}

async function checkSaveMats() {
// Add new mats from wiki if they don't exist in LocalStorage.
let materials = await getMatsfromWiki();
if (localStorage.getItem("archMats") != null) {
const saveData = JSON.parse(localStorage.archMats);
// Add new mats from wiki if they don't exist in LocalStorage.
let materials = await getMatsfromWiki();
materials.forEach((mat, i) => {
if (!saveData[i]) {
console.debug("Adding new Material: " + mat.name);
Expand Down

0 comments on commit c270f03

Please sign in to comment.