fix: Cannot read properties of undefined (reading 'id')
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user