diff --git a/web/public/mtg/app.js b/web/public/mtg/app.js index 182d323f..b7358a49 100644 --- a/web/public/mtg/app.js +++ b/web/public/mtg/app.js @@ -20,10 +20,6 @@ flag = true page = 1 sets = {} -fetch('jsons/set.json') - .then((response) => response.json()) - .then((data) => (sets = data)) - window.console.log(sets) document.location.search.split('&').forEach((pair) => { let v = pair.split('=') @@ -38,6 +34,12 @@ document.location.search.split('&').forEach((pair) => { } }) +if (whichGuesser === 'basic') { + fetch('jsons/set.json') + .then((response) => response.json()) + .then((data) => (sets = data)) +} + let firstFetch = fetch('jsons/' + whichGuesser + '.json') fetchToResponse(firstFetch)