Skip to content

Commit 300323d

Browse files
Backport PR #427: Fix collaborators panel breaking on opening files without known extension (#451)
Co-authored-by: Michał Krassowski <[email protected]>
1 parent 926b67f commit 300323d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/collaboration/src/collaboratorspanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export function Collaborator(props: {
166166
const fileTypes = props.docRegistry
167167
?.getFileTypesForPath(path[1])
168168
?.filter(ft => ft.icon !== undefined);
169-
const icon = fileTypes ? fileTypes[0].icon! : fileIcon;
169+
const icon = fileTypes?.length ? fileTypes[0].icon : fileIcon;
170170
const iconClass: string | undefined = fileTypes
171171
? fileTypes[0].iconClass
172172
: undefined;

0 commit comments

Comments
 (0)