Completed
Push — master ( d771b6...a267a2 )
by Junior
10s
created

config/polyfills.js   A

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 16
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
wmc 1
c 1
b 0
f 1
nc 2
mnd 1
bc 1
fnc 0
dl 0
loc 16
rs 10
bpm 0
cpm 0
noi 1
1
'use strict';
2
3
if (typeof Promise === 'undefined') {
4
  // Rejection tracking prevents a common issue where React gets into an
5
  // inconsistent state due to an error, but it gets swallowed by a Promise,
6
  // and the user has no idea what causes React's erratic future behavior.
7
  require('promise/lib/rejection-tracking').enable();
8
  window.Promise = require('promise/lib/es6-extensions.js');
9
}
10
11
// fetch() polyfill for making API calls.
12
require('whatwg-fetch');
13
14
// Object.assign() is commonly used with React.
15
// It will use the native implementation if it's present and isn't buggy.
16
Object.assign = require('object-assign');
17