insin / react-maskedinput

Masked <input/> React component

Home Page:http://insin.github.io/react-maskedinput/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server side rendering failing on undefined navigator

justinrex opened this issue · comments

commented

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)

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

It was actually a lot easier than that #83

commented

👍