cooperka / react-native-snackbar

:candy: Material Design "Snackbar" component for Android and iOS.
Other
823 stars 152 forks source link

Don't display Snackbar if view is `null` (android only) #94

Closed chocky335 closed 5 years ago

chocky335 commented 5 years ago

That hotfix should prevent fantom crashes on android #93

cooperka commented 5 years ago

Thanks for looking into this @chocky335. Can you please move the check to immediately after this line and continue instead of return?

Reason being that displaySnackbar expects the view to exist, so crashing would be expected if it gets bad params. We should never pass a null view to displaySnackbar. We already check elsewhere, so the only place the view could be null is in the modals.

chocky335 commented 5 years ago

You are completely right! Updated PR)

cooperka commented 5 years ago

Thanks again @chocky335. Released in v0.5.3