alexmingoia / purescript-pux

Build type-safe web apps with PureScript.
https://www.purescript-pux.org
Other
565 stars 76 forks source link

Fix crash when React event object is null #136

Closed daniel-chambers closed 7 years ago

daniel-chambers commented 7 years ago

It seems some React components will send null as the event object (for example, react-select), and Pux will crash on these.

This PR simply adds a truthiness test to make sure the event object is not null or undefined before trying to access nativeEvent.

alexmingoia commented 7 years ago

Thank you!