From 762feba94c696665f84910b96ceaf0f396dc53ea Mon Sep 17 00:00:00 2001 From: Merlin Danner Date: Wed, 29 Mar 2023 07:06:29 +0200 Subject: [PATCH] Use syntactic sugar to check if Ids is undefined --- src/utils/jellyfin-apiclient/getItems.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/jellyfin-apiclient/getItems.ts b/src/utils/jellyfin-apiclient/getItems.ts index ebdeeca8d8..b08fefe8d4 100644 --- a/src/utils/jellyfin-apiclient/getItems.ts +++ b/src/utils/jellyfin-apiclient/getItems.ts @@ -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);