fix: Handle null case (#2118)

This commit is contained in:
Saumya Pandey
2021-05-06 07:17:23 +05:30
committed by GitHub
parent d21594a6f4
commit 6ef8d9ddb3

View File

@ -229,6 +229,10 @@ Collection.membershipUserIds = async (collectionId: string) => {
collectionId
);
if (!collection) {
return [];
}
const groupMemberships = collection.collectionGroupMemberships
.map((cgm) => cgm.group.groupMemberships)
.flat();