🚨 Fix compilation for types

This commit is contained in:
ajnart
2022-05-23 10:44:31 +02:00
parent 64dbb9c025
commit 10d9ffc740
2 changed files with 3 additions and 4 deletions

View File

@@ -66,7 +66,7 @@ export function DndList({ data }: DndListProps) {
return (
<DragDropContext
onDragEnd={({ destination, source }) =>
handlers.reorder({ from: source.index, to: destination.index })
handlers.reorder({ from: source.index, to: (destination && destination.index) ?? -1 })
}
>
<Droppable droppableId="dnd-list" direction="vertical">