mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
assign data before returning value
This commit is contained in:
parent
20391c52e3
commit
0a6fefd417
1 changed files with 2 additions and 1 deletions
|
@ -3,7 +3,8 @@ let data;
|
||||||
function getConfig() {
|
function getConfig() {
|
||||||
if (data) return Promise.resolve(data);
|
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();
|
data = response.json();
|
||||||
|
return data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue