From ef6454a157ebb1988b488e34c9a83acc59e93e9a Mon Sep 17 00:00:00 2001 From: starmorph Date: Tue, 20 May 2025 14:48:17 -0700 Subject: [PATCH] CR: fix ++ --> +=1 --- src/hooks/use-file-upload.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hooks/use-file-upload.tsx b/src/hooks/use-file-upload.tsx index 664de4a..39dbaf9 100644 --- a/src/hooks/use-file-upload.tsx +++ b/src/hooks/use-file-upload.tsx @@ -86,13 +86,13 @@ export function useFileUpload({ // Global drag events with counter for robust dragOver state const handleWindowDragEnter = (e: DragEvent) => { if (e.dataTransfer?.types?.includes("Files")) { - dragCounter.current++; + dragCounter.current += 1; setDragOver(true); } }; const handleWindowDragLeave = (e: DragEvent) => { if (e.dataTransfer?.types?.includes("Files")) { - dragCounter.current--; + dragCounter.current -= 1; if (dragCounter.current <= 0) { setDragOver(false); dragCounter.current = 0; @@ -204,7 +204,7 @@ export function useFileUpload({ const items = e.clipboardData.items; if (!items) return; const files: File[] = []; - for (let i = 0; i < items.length; i++) { + for (let i = 0; i < items.length; i += 1) { const item = items[i]; if (item.kind === "file") { const file = item.getAsFile();