You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly huge thanks for such amazing module!
In some edge cases (like in my own) there can be a `undefined` React child. Easy to reproduce:
```js
<ReactSortable>
{some_var ? <li>123</li> : undefined}
<li>123</li>
</ReactSortable>
```
In such case crash happen because code can't read property of undefined object.
Just check changes that I made into `react-sortable.tsx` file you will understand what I'm trying to achieve.
I also changed this line from `const item = list[index];` to `const item = list[index] || {};` , just to be sure that if list doesn't have particular index, whole code not fail.
This two changes are made to prevent edge case crashes. In my own app I spend a lot of time to find out why sometime app is crashing.
Please, please approve this pull request!
0 commit comments