Skip to content

Commit

Permalink
GN-4693: Insert LPDC
Browse files Browse the repository at this point in the history
PR comment fixes
  • Loading branch information
dkozickis committed May 22, 2024
1 parent af7ed2a commit 802f882
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions addon/plugins/lpdc-plugin/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,11 @@ export const fetchLpdcs = async ({

return {
lpdc: (resultJson.hydraMember ?? [])
.filter(
(lpdc): lpdc is LPDCInstance & { naam: { nl: string; en: string } } =>
Boolean(lpdc.naam?.nl || lpdc.naam?.en),
)
.map((lpdc) => ({
uri: lpdc['@id'],
name: lpdc.naam.nl ?? lpdc.naam.en,
})),
}))
.filter((lpdc): lpdc is LPDC => lpdc.name !== undefined),
pageIndex: resultJson.hydraPageIndex,
meta: {
count: resultJson.hydraTotalItems,
Expand Down

0 comments on commit 802f882

Please sign in to comment.