mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add handling of undefined cases for tsc
The handled cases are never going to actually be undefined, as the affected variables are defined before. tsc however was not satisfied so these changed had to be made.
This commit is contained in:
parent
762feba94c
commit
d8bbba2dc9
1 changed files with 3 additions and 3 deletions
|
@ -42,9 +42,9 @@ function mergeResults(results: BaseItemDtoQueryResult[]) {
|
|||
console.log('[getItems] Retrieved StartIndex is invalid', result.StartIndex);
|
||||
continue;
|
||||
}
|
||||
merged.Items = merged.Items.concat(result.Items);
|
||||
merged.TotalRecordCount += result.TotalRecordCount;
|
||||
merged.StartIndex = Math.min(merged.StartIndex, result.StartIndex);
|
||||
merged.Items = merged.Items?.concat(result.Items);
|
||||
merged.TotalRecordCount! += result.TotalRecordCount;
|
||||
merged.StartIndex = Math.min(merged.StartIndex || 0, result.StartIndex);
|
||||
}
|
||||
return merged;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue