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

This commit is contained in:
Tom Moor
2024-02-01 07:20:26 -05:00
parent 5c368f1433
commit fde8a9fd88
2 changed files with 3 additions and 2 deletions

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