fixed pasting files and images

This commit is contained in:
or-else
2022-05-17 15:53:11 -07:00
parent a9e4f644a2
commit ec01ac2a50
6 changed files with 12 additions and 15 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ export function blobToBase64(blob) {
// File pasted from the clipboard. It's either an inline image or a file attachment.
export function filePasted(event, onImageSuccess, onAttachmentSuccess, onError) {
const items = (event.clipboardData || event.originalEvent.clipboardData || {}).items;
if (!Array.isArray(items)) {
if (!items || !items.length) {
return false;
}