don't consider localhost as PRODUCTION

This commit is contained in:
Azgaar 2021-09-12 00:16:29 +03:00
parent 055c55b731
commit f07cbe9323
6 changed files with 7 additions and 10 deletions

View file

@ -1795,7 +1795,7 @@ window.COArenderer = (function () {
return fetchedCharges.join("");
}
const url = PRODUCTION ? "./charges/" : "http://armoria.herokuapp.com/charges/"; // on local machine fetch files from server
const url = location.hostname ? "./charges/" : "http://armoria.herokuapp.com/charges/"; // on local machine fetch files from server
async function fetchCharge(charge, id) {
const fetched = fetch(url + charge + ".svg")
.then(res => {