mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 17:08:03 +08:00
fix(web): use Array.from() for FileList to fix tsc type errors (#31398)
This commit is contained in:
@ -36,7 +36,7 @@ export const useUploader = ({ onFileChange, containerRef, enabled = true }: Uplo
|
||||
setDragging(false)
|
||||
if (!e.dataTransfer)
|
||||
return
|
||||
const files = [...e.dataTransfer.files]
|
||||
const files = Array.from(e.dataTransfer.files)
|
||||
if (files.length > 0)
|
||||
onFileChange(files[0])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user