1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

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() { function getConfig() {
if (data) return Promise.resolve(data);
return fetch("/config.json?nocache=" + new Date().getUTCMilliseconds()).then(function (response) { return fetch("/config.json?nocache=" + new Date().getUTCMilliseconds()).then(function (response) {
return response.json(); return response.json();
}); });