We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14c1488 commit 2e1419aCopy full SHA for 2e1419a
packages/collaboration/src/collaboratorspanel.tsx
@@ -166,7 +166,7 @@ export function Collaborator(props: {
166
const fileTypes = props.docRegistry
167
?.getFileTypesForPath(document)
168
?.filter(ft => ft.icon !== undefined);
169
- const icon = fileTypes ? fileTypes[0].icon! : fileIcon;
+ const icon = fileTypes?.length ? fileTypes[0].icon : fileIcon;
170
const iconClass: string | undefined = fileTypes
171
? fileTypes[0].iconClass
172
: undefined;
0 commit comments