From bd7f1869cec8f136f54fdd7a2bcd777a522263b7 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 21 Dec 2025 23:22:14 +0400 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index daa3d26fe2..61c431f53e 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1604,7 +1604,7 @@ ..._files.filter( (item) => ['doc', 'text', 'note', 'chat', 'folder', 'collection'].includes(item.type) || - (item.type === 'file' && !item?.content_type?.startsWith('image/')) + (item.type === 'file' && !(item?.content_type ?? '').startsWith('image/')) ) ); chatFiles = chatFiles.filter( @@ -1831,7 +1831,7 @@ ...(userMessage?.files ?? []).filter( (item) => ['doc', 'text', 'note', 'chat', 'collection'].includes(item.type) || - (item.type === 'file' && !item?.content_type.startsWith('image/')) + (item.type === 'file' && !(item?.content_type ?? '').startsWith('image/')) ) ); // Remove duplicates