fix: Dragging strings into document can attempt (and file) to insert as attachment

This commit is contained in:
Tom Moor
2022-03-06 21:47:30 -08:00
parent 631d600920
commit cf446be2df

View File

@@ -74,7 +74,9 @@ const uploadPlugin = (options: Options) =>
} }
// filter to only include image files // filter to only include image files
const files = getDataTransferFiles(event); const files = getDataTransferFiles(event).filter(
(dt: any) => dt.kind !== "string"
);
if (files.length === 0) { if (files.length === 0) {
return false; return false;
} }