fix: Cannot read properties of undefined (reading 'id')

This commit is contained in:
Tom Moor committed 2024-02-01 07:20:26 -05:00
1 parent 5c368f1433
commit fde8a9fd88
2 files changed
+3 -2

No files matched your search

@@ -106,7 +106,7 @@ function DocumentMembersList({ document, invitedInSession }: Props) {
document.members,
(user) =>
(invitedInSession.includes(user.id) ? "_" : "") +
user.name.toLowerCase(),
user.name.toLocaleLowerCase(),
"asc"
),
[document.members, invitedInSession]
+2 -1
View File
@@ -242,7 +242,8 @@ export default class Document extends ParanoidModel {
get members(): User[] {
return this.store.rootStore.userMemberships.orderedData
.filter((m) => m.documentId === this.id)
.map((m) => m.user);
.map((m) => m.user)
.filter(Boolean);
}
@computed