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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();