feat: prevent crash
This commit is contained in:
parent
0165d73ce9
commit
9724b127c8
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue