mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Replace existence check with optional chaining (#5742)
This commit is contained in:
parent
cc22fbc042
commit
1da9b548ac
10 changed files with 21 additions and 21 deletions
|
@ -716,7 +716,7 @@ class ChromecastPlayer {
|
|||
});
|
||||
}
|
||||
|
||||
if (options.items.length > 1 && options && options.ids) {
|
||||
if (options.items.length > 1 && options?.ids) {
|
||||
// Use the original request id array for sorting the result in the proper order
|
||||
options.items.sort(function (a, b) {
|
||||
return options.ids.indexOf(a.Id) - options.ids.indexOf(b.Id);
|
||||
|
|
|
@ -105,7 +105,7 @@ function mergePlaybackQueries(obj1, obj2) {
|
|||
}
|
||||
|
||||
export function translateItemsForPlayback(apiClient, items, options) {
|
||||
if (items.length > 1 && options && options.ids) {
|
||||
if (items.length > 1 && options?.ids) {
|
||||
// Use the original request id array for sorting the result in the proper order.
|
||||
items.sort(function (a, b) {
|
||||
return options.ids.indexOf(a.Id) - options.ids.indexOf(b.Id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue