mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix wizard route and config load error
This commit is contained in:
parent
0778406c16
commit
8c3e72fe7b
3 changed files with 44 additions and 32 deletions
|
@ -2,7 +2,17 @@ let data;
|
|||
|
||||
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(response => {
|
||||
data = response.json();
|
||||
return data;
|
||||
}).catch(error => {
|
||||
return getDefaultConfig();
|
||||
});
|
||||
}
|
||||
|
||||
function getDefaultConfig() {
|
||||
console.warn('web config file is missing so the template will be used')
|
||||
return fetch('/config.template.json').then(function (response) {
|
||||
data = response.json();
|
||||
return data;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue