1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add some extra null handling just in case

This commit is contained in:
Claus Vium 2019-03-11 08:30:36 +01:00
parent 9ba1961a0c
commit 5ce13990b6

View file

@ -1806,7 +1806,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
}
function translateItemsForPlayback(items, options) {
if (items.length > 1) {
if (items.length > 1 && options && 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);