source: frontend/node_modules/react-app-polyfill/ie11.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[9af201e]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
9if (typeof Promise === 'undefined') {
10 // Rejection tracking prevents a common issue where React gets into an
11 // inconsistent state due to an error, but it gets swallowed by a Promise,
12 // and the user has no idea what causes React's erratic future behavior.
13 require('promise/lib/rejection-tracking').enable();
14 self.Promise = require('promise/lib/es6-extensions.js');
15}
16
17// Make sure we're in a Browser-like environment before importing polyfills
18// This prevents `fetch()` from being imported in a Node test environment
19if (typeof window !== 'undefined') {
20 // fetch() polyfill for making API calls.
21 require('whatwg-fetch');
22}
23
24// Object.assign() is commonly used with React.
25// It will use the native implementation if it's present and isn't buggy.
26Object.assign = require('object-assign');
27
28// Support for...of (a commonly used syntax feature that requires Symbols)
29require('core-js/features/symbol');
30// Support iterable spread (...Set, ...Map)
31require('core-js/features/array/from');
Note: See TracBrowser for help on using the repository browser.