mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix null checking
This commit is contained in:
parent
5257d95559
commit
9dff961bba
2 changed files with 3 additions and 3 deletions
|
|
@ -55,8 +55,8 @@ export interface RequestContext {
|
|||
highlights: DataLoader<string, Highlight[]>
|
||||
recommendations: DataLoader<string, Recommendation[]>
|
||||
uploadFiles: DataLoader<string, UploadFile | undefined>
|
||||
libraryItems: DataLoader<string, LibraryItem>
|
||||
publicItems: DataLoader<string, PublicItem>
|
||||
libraryItems: DataLoader<string, LibraryItem | undefined>
|
||||
publicItems: DataLoader<string, PublicItem | undefined>
|
||||
subscriptions: DataLoader<string, Subscription>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ export const batchGetLibraryItems = async (ids: readonly string[]) => {
|
|||
],
|
||||
})
|
||||
|
||||
return ids.map((id) => items.find((item) => item.id === id) || null)
|
||||
return ids.map((id) => items.find((item) => item.id === id) || undefined)
|
||||
}
|
||||
|
||||
export const getItemUrl = (id: string) => `${env.client.url}/me/${id}`
|
||||
|
|
|
|||
Loading…
Reference in a new issue