dnd-kit
dnd-kit copied to clipboard
Handle cases where `id` passed to `useDraggable` or `useDroppable` is nullish
Originally posted by @flexa-david in https://github.com/clauderic/dnd-kit/discussions/782#discussioncomment-2887581
Hi @clauderic, thanks for your response - turns out it was a data issue on my side. For what it's worth, it was because the
id
that was being used in theuseSortable
was undefined (perhaps in SSR), and it was stuck in isDragging === true, due to undefined === undefined in https://github.com/clauderic/dnd-kit/blob/8fbbfd79df7ff9343017f3067d04f1636a745f02/packages/core/src/hooks/useDraggable.ts#L61