From 31cca0146f2a0a24a6e4176dc96f9ab382a17af5 Mon Sep 17 00:00:00 2001 From: Aleksander Date: Mon, 9 Jul 2018 09:57:17 +0300 Subject: [PATCH] use es7/promise polyfill instead of es6 for finally support (#147) closes #122 --- web/app/common/polyfills.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/web/app/common/polyfills.js b/web/app/common/polyfills.js index e68f65a0..05c15b1d 100644 --- a/web/app/common/polyfills.js +++ b/web/app/common/polyfills.js @@ -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 = () => {