From 721fd98be0fa604f367df8ccc54386dd1af3dc4c Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:01:41 +0000 Subject: [PATCH] Fix Collaborator panel breaking on opening files without known extension --- packages/collaboration/src/collaboratorspanel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/collaboration/src/collaboratorspanel.tsx b/packages/collaboration/src/collaboratorspanel.tsx index 5156c37a..277ad176 100644 --- a/packages/collaboration/src/collaboratorspanel.tsx +++ b/packages/collaboration/src/collaboratorspanel.tsx @@ -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;