ie11.js 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. 'use strict';
  8. if (typeof Promise === 'undefined') {
  9. // Rejection tracking prevents a common issue where React gets into an
  10. // inconsistent state due to an error, but it gets swallowed by a Promise,
  11. // and the user has no idea what causes React's erratic future behavior.
  12. require('promise/lib/rejection-tracking').enable();
  13. self.Promise = require('promise/lib/es6-extensions.js');
  14. }
  15. // Make sure we're in a Browser-like environment before importing polyfills
  16. // This prevents `fetch()` from being imported in a Node test environment
  17. if (typeof window !== 'undefined') {
  18. // fetch() polyfill for making API calls.
  19. require('whatwg-fetch');
  20. }
  21. // Object.assign() is commonly used with React.
  22. // It will use the native implementation if it's present and isn't buggy.
  23. Object.assign = require('object-assign');
  24. // Support for...of (a commonly used syntax feature that requires Symbols)
  25. require('core-js/features/symbol');
  26. // Support iterable spread (...Set, ...Map)
  27. require('core-js/features/array/from');