|
|
@ -87,7 +87,7 @@ const onDrop = async (event: DragEvent) => { |
|
|
|
event.preventDefault() |
|
|
|
event.preventDefault() |
|
|
|
try { |
|
|
|
try { |
|
|
|
// Access the dropped data |
|
|
|
// Access the dropped data |
|
|
|
const data = JSON.parse(event.dataTransfer!.getData('text/json')) |
|
|
|
const data = JSON.parse(event.dataTransfer!.getData('text/json') || '{}') |
|
|
|
// Do something with the received data |
|
|
|
// Do something with the received data |
|
|
|
|
|
|
|
|
|
|
|
// if dragged item is not from the same source, return |
|
|
|
// if dragged item is not from the same source, return |
|
|
|