We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8025d33 commit 4581bfdCopy full SHA for 4581bfd
src/features/sort/hooks/useDraggableStack.ts
@@ -57,6 +57,11 @@ export const useDraggableStack = ({
57
if (siblingId === id) {
58
continue;
59
}
60
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
61
+ if (!layouts[siblingId]) {
62
+ // Can happen if some items are being removed from the stack
63
+ continue;
64
+ }
65
const prevSiblingIndex = initialOrder.findIndex((itemId) => itemId === siblingId);
66
// Accummulate the directional offset for the active item
67
if (nextSiblingIndex < nextIndex && prevSiblingIndex > prevIndex) {
0 commit comments