bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.89k stars 209 forks source link

Don't blow up when `self` doesn't exist #514

Closed glittershark closed 7 years ago

glittershark commented 7 years ago

PR #498 added support for running in a web-worker, which is cool, but also implicitly assumed that self would always be defined - that's not the case on react-native. This fixes that by changing this to use exists?, and checking if self exists before trying to access properties on it

bhauman commented 7 years ago

Thanks!