1
0
Fork 0
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:
Bill Thornton 2024-07-26 11:37:26 -04:00 committed by GitHub
commit b9dea3a788
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 8 additions and 7 deletions

View file

@ -2502,7 +2502,7 @@ class PlaybackManager {
return Promise.resolve()
.then(() => {
if (!isServerItem(item) || itemHelper.isLocalItem(item)) {
return Promise.reject('skip bitrate detection');
return Promise.reject(new Error('skip bitrate detection'));
}
return apiClient.getEndpointInfo()
@ -2514,7 +2514,7 @@ class PlaybackManager {
});
}
return Promise.reject('skip bitrate detection');
return Promise.reject(new Error('skip bitrate detection'));
});
})
.catch(() => getSavedMaxStreamingBitrate(apiClient, mediaType));