Skip to content

Commit

Permalink
Fix Collaborator panel breaking on opening files without known extension
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Jan 7, 2025
1 parent 14c1488 commit 721fd98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/collaboration/src/collaboratorspanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export function Collaborator(props: {
const fileTypes = props.docRegistry
?.getFileTypesForPath(document)
?.filter(ft => ft.icon !== undefined);
const icon = fileTypes ? fileTypes[0].icon! : fileIcon;
const icon = fileTypes?.length ? fileTypes[0].icon : fileIcon;
const iconClass: string | undefined = fileTypes
? fileTypes[0].iconClass
: undefined;
Expand Down

0 comments on commit 721fd98

Please sign in to comment.