Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of null (reading 'props'), found the issue #284

Open
leqwasd opened this issue Aug 14, 2023 · 0 comments
Open

Cannot read properties of null (reading 'props'), found the issue #284

leqwasd opened this issue Aug 14, 2023 · 0 comments

Comments

@leqwasd
Copy link
Contributor

leqwasd commented Aug 14, 2023

I think I found an issue with one condition here:

if (child === undefined) return undefined;

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:

const { className: prevClassName } = child.props;

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant