We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 335bb96 + 17878f7 commit 8a7cb54Copy full SHA for 8a7cb54
src/react-sortable.tsx
@@ -115,7 +115,9 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
115
const dataid = dataIdAttr || "data-id";
116
/* eslint-disable-next-line */
117
return Children.map(children as ReactElement<any>[], (child, index) => {
118
- const item = list[index];
+ if (child === undefined) return undefined
119
+
120
+ const item = list[index] || {};
121
const { className: prevClassName } = child.props;
122
123
// @todo - handle the function if avalable. I don't think anyone will be doing this soon.
0 commit comments