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:
parent
2f44701a03
commit
31048d0ce5
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue