Skip to content

Commit d8ab123

Browse files
committed
fix: update image paste handling in ChatInput to return null if no items are present
1 parent 32023d7 commit d8ab123

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/ChatInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const ChatInput: React.FC<Props> = ({ page, onSendMessage, disabled, onAbort })
174174

175175
const imageItems = Array.from(items).filter(item => item.type.startsWith("image/"))
176176
if (imageItems.length === 0)
177-
return handlePasteInTauri()
177+
return items.length == 0 ? handlePasteInTauri() : null
178178

179179
if (imageItems.length > 0) {
180180
e.preventDefault()

0 commit comments

Comments
 (0)