diff --git a/config/polyfills.js b/config/polyfills.js index 7e601502b24b7ffeb3d4eebd9e33eaae6680c8c8..860258c783ea1518e2a298ad88fd24d6f67911b8 100644 --- a/config/polyfills.js +++ b/config/polyfills.js @@ -3,7 +3,9 @@ if (typeof Promise === 'undefined') { // inconsistent state due to an error, but it gets swallowed by a Promise, // and the user has no idea what causes React's erratic future behavior. require('promise/lib/rejection-tracking').enable(); - window.Promise = require('promise/lib/es6-extensions.js'); + if (typeof window !== 'undefined') { + window.Promise = require('promise/lib/es6-extensions.js'); + } } // fetch() polyfill for making API calls.