Skip to content

Commit

Permalink
fix library annotation loading
Browse files Browse the repository at this point in the history
  • Loading branch information
drewdaemon committed May 26, 2023
1 parent d278eb0 commit 63d9b3a
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,15 @@ const initializeEventAnnotationGroups = async (
) => {
const annotationGroups: Record<string, EventAnnotationGroupConfig> = {};

const annotationGroupResponses = await Promise.allSettled(
await Promise.allSettled(
(references || [])
.filter((ref) => ref.type === EVENT_ANNOTATION_GROUP_TYPE)
.map(({ id }) => eventAnnotationService.loadAnnotationGroup(id))
.map(({ id }) =>
eventAnnotationService.loadAnnotationGroup(id).then((group) => {
annotationGroups[id] = group;
})
)
);
for (const response of annotationGroupResponses) {
if (response.status === 'fulfilled') {
annotationGroups[response.value.id] = response.value;
}
}

return annotationGroups;
};
Expand Down

0 comments on commit 63d9b3a

Please sign in to comment.