1 | // @remove-on-eject-begin
|
2 | /**
|
3 | * Copyright (c) 2015-present, Facebook, Inc.
|
4 | * All rights reserved.
|
5 | *
|
6 | * This source code is licensed under the BSD-style license found in the
|
7 | * LICENSE file in the root directory of this source tree. An additional grant
|
8 | * of patent rights can be found in the PATENTS file in the same directory.
|
9 | */
|
10 | // @remove-on-eject-end
|
11 | ;
|
12 |
|
13 | if (typeof Promise === 'undefined') {
|
14 | // Rejection tracking prevents a common issue where React gets into an
|
15 | // inconsistent state due to an error, but it gets swallowed by a Promise,
|
16 | // and the user has no idea what causes React's erratic future behavior.
|
17 | require('promise/lib/rejection-tracking').enable();
|
18 | window.Promise = require('promise/lib/es6-extensions.js');
|
19 | }
|
20 |
|
21 | // fetch() polyfill for making API calls.
|
22 | require('whatwg-fetch');
|
23 |
|
24 | // Object.assign() is commonly used with React.
|
25 | // It will use the native implementation if it's present and isn't buggy.
|
26 | Object.assign = require('object-assign');
|