mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #5734 from prsantos-com/sonarcloud-promise-rejection
Use Error instead of literal for promise rejection
This commit is contained in:
commit
b9dea3a788
7 changed files with 8 additions and 7 deletions
|
@ -389,7 +389,7 @@ class AppRouter {
|
|||
if (firstResult.State === ConnectionState.ServerSignIn) {
|
||||
const url = firstResult.ApiClient.serverAddress() + '/System/Info/Public';
|
||||
fetch(url).then(response => {
|
||||
if (!response.ok) return Promise.reject('fetch failed');
|
||||
if (!response.ok) return Promise.reject(new Error('fetch failed'));
|
||||
return response.json();
|
||||
}).then(data => {
|
||||
if (data !== null && data.StartupWizardCompleted === false) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue