mobxjs / mobx-react

React bindings for MobX
https://mobx.js.org/react-integration.html
MIT License
4.85k stars 350 forks source link

Issue #801: Check if process.env is defined when using Provider #812

Closed ynejati closed 4 years ago

ynejati commented 4 years ago

Resolves issue #801, where process.env may not exist when using a Provider which can cause an application to crash. Simple check to ensure that the browser does not throw a reference error. This is only used in Provider.js to throw an error in development builds if we detect that the set of stores have changed.