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
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 useexists?
, and checking ifself
exists before trying to access properties on it