only load the config once per session

This commit is contained in:
dkanada 2020-04-02 19:44:21 +09:00
parent 2f44701a03
commit 31048d0ce5

View file

@ -1,4 +1,7 @@
let data;
function getConfig() {
if (data) return Promise.resolve(data);
return fetch("/config.json?nocache=" + new Date().getUTCMilliseconds()).then(function (response) {
return response.json();
});