Skip to content

null children causes crash #10

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

Closed
lopezjurip opened this issue May 19, 2016 · 6 comments
Closed

null children causes crash #10

lopezjurip opened this issue May 19, 2016 · 6 comments

Comments

@lopezjurip
Copy link

null is not an object (evaluating 'child.props')

Perhaps filter null childs before rendering Section childs on https://github.com/Purii/react-native-tableview-simple/blob/master/components/Section.js#L53-L77

@Purii
Copy link
Owner

Purii commented May 19, 2016

@mrpatiwi Do you have an example?

@lopezjurip
Copy link
Author

I'm closing this issue, I fixed it upgrading React Native

@Purii
Copy link
Owner

Purii commented May 22, 2016

@mrpatiwi Which version did you use before?

@miracle2k
Copy link

This is a real issue. It happens if you do for example this:

 <TableView><Section>
   {showFirstItem ? <Cell /> : null}
 </Section></TableView>

See also facebook/react#4867

miracle2k pushed a commit to miracle2k/react-native-tableview-simple that referenced this issue Jan 19, 2017
@Purii
Copy link
Owner

Purii commented Jan 19, 2017

@miracle2k I do not get any errors with this:

<Section>
   { false || null}
</Section>

What happens with your environment?

@miracle2k
Copy link

No error with this. But {{ false && <View /> }} does trigger it. Might be some optimization going on there??

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

3 participants