UNPKG

606 BJavaScriptView Raw
1if(typeof Promise === 'undefined') {
2 // Rejection tracking prevents a common issue where React gets into an
3 // inconsistent state due to an error, but it gets swallowed by a Promise,
4 // and the user has no idea what causes React's erratic future behavior.
5 require('promise/lib/rejection-tracking').enable();
6 window.Promise = require('promise/lib/es6-extensions.js');
7}
8
9// fetch() polyfill for making API calls.
10require('whatwg-fetch');
11
12// Object.assign() is commonly used with React.
13// It will use the native implementation if it's present and isn't buggy.
14Object.assign = require('object-assign');
\No newline at end of file