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

Use syntactic sugar to check if Ids is undefined

This commit is contained in:
Merlin Danner 2023-03-29 07:06:29 +02:00
parent 2154ea64ad
commit 762feba94c

View file

@ -50,8 +50,7 @@ function mergeResults(results: BaseItemDtoQueryResult[]) {
}
export function getItems(apiClient: ApiClient, userId: string, options?: any) {
if (options.Ids === undefined ||
options.Ids.split(',').length <= ITEMS_PER_REQUEST_LIMIT) {
if (options.Ids?.split(',').length <= ITEMS_PER_REQUEST_LIMIT) {
return apiClient.getItems(apiClient.getCurrentUserId(), options);
}
const results = getItemsSplit(apiClient, userId, options);