We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 93f848e + 51bafba commit 9234a38Copy full SHA for 9234a38
src/hooks/use-file-upload.tsx
@@ -200,7 +200,6 @@ export function useFileUpload({
200
const handlePaste = async (
201
e: React.ClipboardEvent<HTMLTextAreaElement | HTMLInputElement>,
202
) => {
203
- e.preventDefault();
204
const items = e.clipboardData.items;
205
if (!items) return;
206
const files: File[] = [];
@@ -211,7 +210,10 @@ export function useFileUpload({
211
210
if (file) files.push(file);
212
}
213
214
- if (files.length === 0) return;
+ if (files.length === 0) {
+ return;
215
+ }
216
+ e.preventDefault();
217
const validFiles = files.filter((file) =>
218
SUPPORTED_FILE_TYPES.includes(file.type),
219
);
0 commit comments