Cannot read properties of null (reading 'props'), found the issue
leqwasd opened this issue · 0 comments
leqwasd commented
I think I found an issue with one condition here:
react-sortablejs/src/react-sortable.tsx
Line 121 in 48e8780
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:
react-sortablejs/src/react-sortable.tsx
Line 124 in 48e8780
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?