use es7/promise polyfill instead of es6 for finally support (#147)

closes #122
This commit is contained in:
Aleksander
2018-07-09 10:57:17 +04:00
committed by Aleksei Gurianov
parent 0ee7a6940a
commit 31cca0146f
+1 -13
View File
@@ -1,16 +1,4 @@
import 'core-js/es6/promise';
// default promise polyfill doesn't include finally
Promise.prototype.finally = function finallyFn(callback) {
const constructor = this.constructor;
return this.then(
value => constructor.resolve(callback()).then(() => value),
reason => constructor.resolve(callback()).then(() => reason)
);
};
window.Promise = Promise;
import 'core-js/es7/promise';
export default function loadPolyfills() {
const fillCoreJs = () => {