Skip to content

Commit

Permalink
refactor: better way to do fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
puppy-girl committed Sep 24, 2024
1 parent 12cf98e commit 7fe55fc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/localisation.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ async function setLocale(locale) {
}

async function fetchLocalisation(locale) {
const response =
(await fetch(`./lang/${locale}.json`)) ||
(await fetch(`./payday-weapon-bench/lang/${locale}.json`));

const response = await fetch(`./lang/${locale}.json`, window.location);
return await response.json();
}

Expand Down

0 comments on commit 7fe55fc

Please sign in to comment.