Open leqwasd opened 1 year ago
I think I found an issue with one condition here: https://github.com/SortableJS/react-sortablejs/blob/48e8780a1c92e071da61a67e95acd8212d906523/src/react-sortable.tsx#L121
My render looks like this (psudo)
interface Data { columns: string[]; optionalColumns?: string[]; } [..] return ( <ReactSortable ...> {optionalColumns?.map(x => <Item x={x} />)} {columns.map(x => <Item x={x} />)} </ReactSortable> )
It fails for me on line: https://github.com/SortableJS/react-sortablejs/blob/48e8780a1c92e071da61a67e95acd8212d906523/src/react-sortable.tsx#L124
Because the guard at line 121 does not handle this...
null === undefined // false
Shouldn't there be just child == null ? Double eq with null, which will handle nulls and undefineds?
child == null
I think I found an issue with one condition here: https://github.com/SortableJS/react-sortablejs/blob/48e8780a1c92e071da61a67e95acd8212d906523/src/react-sortable.tsx#L121
My render looks like this (psudo)
It fails for me on line: https://github.com/SortableJS/react-sortablejs/blob/48e8780a1c92e071da61a67e95acd8212d906523/src/react-sortable.tsx#L124
Because the guard at line 121 does not handle this...
null === undefined // false
Shouldn't there be just
child == null
? Double eq with null, which will handle nulls and undefineds?