insin / react-maskedinput

Masked <input/> React component
http://insin.github.io/react-maskedinput/
MIT License
730 stars 197 forks source link

Server side rendering failing on undefined navigator #82

Closed justinrex closed 7 years ago

justinrex commented 7 years ago

https://github.com/insin/react-maskedinput/blob/master/src/index.js#L239

running a node server and trying to render this server side. Running into an issue because navigator is not available on the server

line 239 return navigator.userAgent.match(/Android/i)

aesopwolf commented 7 years ago

Just ran into the same issue. Seems like the events handlers can be stored in this.state after componentDidMount.

aesopwolf commented 7 years ago

It was actually a lot easier than that https://github.com/insin/react-maskedinput/pull/83

justinrex commented 7 years ago

👍