bencripps / react-redux-grid

A React Grid/Tree Component written in the Redux Pattern
http://react-redux-grid.herokuapp.com/
MIT License
446 stars 63 forks source link

navigator is not defined #194

Closed chenEdgar closed 6 years ago

chenEdgar commented 6 years ago

system: win10 browser: chrome version 62.0.3202.75 node: 8.1.2 npm: 5.0.3

I copyed the tree demo in my project, code followed: image

and then I suffered this bug as followed: image

source code as followed: image

I don't know why I got the problem.

bencripps commented 6 years ago

It's odd you're seeing this, since navigator is a common global -- especially in that version of chrome -- however, we could probably fix this by prefixing the var with window.

Some thing like:

window.navigator && test(window.navigator)

Pull requests welcome!

chenEdgar commented 6 years ago

I've tried this but failed again. window is not defined...

bencripps commented 6 years ago

I'm not sure how window could be undefined? https://developer.mozilla.org/en-US/docs/Web/API/Window