From a75fbb06c936da69a3510b14494ca2bd213ad39a Mon Sep 17 00:00:00 2001 From: Kobe Attias Date: Mon, 30 Sep 2024 17:06:42 -0400 Subject: [PATCH] Ensure institutions key is set --- components/Author/lib/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Author/lib/types.ts b/components/Author/lib/types.ts index eac00527c..9de59a3c8 100644 --- a/components/Author/lib/types.ts +++ b/components/Author/lib/types.ts @@ -201,7 +201,7 @@ export const parseFullAuthorProfile = (raw: any): FullAuthorProfile => { worksCount: activity.works_count, citationCount: activity.citation_count, })), - institutions: raw.institutions.map((inst) => { + institutions: (raw.institutions || []).map((inst) => { return { id: inst.id, institution: parseInstitution(inst.institution),