Skip to content

Commit 2e1419a

Browse files
authored
Fix Collaborator panel breaking on opening files without known extension (#427)
1 parent 14c1488 commit 2e1419a

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(document)
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)