feat: prevent crash

This commit is contained in:
Nevo David 2025-08-01 17:40:29 +07:00
parent 0165d73ce9
commit 9724b127c8
1 changed files with 4 additions and 0 deletions

View File

@ -245,6 +245,10 @@ export const MediaBox: FC<{
const dragAndDrop = useCallback(
async (event: ClipboardEvent<HTMLDivElement> | File[]) => {
if (!ref?.current?.setOptions) {
return ;
}
// @ts-ignore
const clipboardItems = event.map((p) => ({
kind: 'file',