Skip to content

Commit

Permalink
Merge pull request #189 from exentrich/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
andresin87 authored Jan 14, 2022
2 parents 335bb96 + 17878f7 commit 8a7cb54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/react-sortable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
const dataid = dataIdAttr || "data-id";
/* eslint-disable-next-line */
return Children.map(children as ReactElement<any>[], (child, index) => {
const item = list[index];
if (child === undefined) return undefined

const item = list[index] || {};
const { className: prevClassName } = child.props;

// @todo - handle the function if avalable. I don't think anyone will be doing this soon.
Expand Down

0 comments on commit 8a7cb54

Please sign in to comment.