diff --git a/CHANGELOG.md b/CHANGELOG.md index bf354c789..58926a7dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to ### Fixed +- 🐛(frontend) prevent the share modal from crashing on team-based accesses - 🐛(frontend) keep uploaded items usable while malware analysis runs - 🐛(backend) stream export files from S3 without buffering diff --git a/src/frontend/apps/drive/src/features/explorer/components/modals/share/ItemShareModal.tsx b/src/frontend/apps/drive/src/features/explorer/components/modals/share/ItemShareModal.tsx index f0597d325..50097a66c 100644 --- a/src/frontend/apps/drive/src/features/explorer/components/modals/share/ItemShareModal.tsx +++ b/src/frontend/apps/drive/src/features/explorer/components/modals/share/ItemShareModal.tsx @@ -147,6 +147,13 @@ export const ItemShareModal = ({ const accessesByUserId = new Map(); data.forEach((access) => { + // Team-based accesses (access.team set, user null) grant a whole team, not a + // single user. This member list is keyed by user id and renders per-user + // rows, so skip them — otherwise `access.user.id` null-derefs and the whole + // modal crashes (a client-side exception). + if (access.team) { + return; + } const existing = accessesByUserId.get(access.user.id); if (!existing) {