mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 11:01:18 +03:00
Bugfix/Allow empty uploads of images (#3135)
allow empty uploads of images
This commit is contained in:
@@ -619,8 +619,8 @@ export const ChatMessage = ({ open, chatflowid, isAgentCanvas, isDialog, preview
|
|||||||
if (e) e.preventDefault()
|
if (e) e.preventDefault()
|
||||||
|
|
||||||
if (!selectedInput && userInput.trim() === '') {
|
if (!selectedInput && userInput.trim() === '') {
|
||||||
const containsAudio = previews.filter((item) => item.type === 'audio').length > 0
|
const containsFile = previews.filter((item) => !item.mime.startsWith('image') && item.type !== 'audio').length > 0
|
||||||
if (!(previews.length >= 1 && containsAudio)) {
|
if (!previews.length || (previews.length && containsFile)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user