From e945ba105844a1f80dacd8c3d30131ec7953eef1 Mon Sep 17 00:00:00 2001 From: Markus Oberlehner Date: Fri, 24 May 2019 16:59:54 +0200 Subject: [PATCH] Fix problem with async / await Babel polyfill Polyfilling async / await is not so easy to do so before this package did only work if the async / await polyfill was already included in the application. Removing the need for async / await makes everything easier. I'm not quite sure why I used it there anyway?! Fixes #21 --- src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index 65cb2bd..f10dfb8 100644 --- a/src/utils.js +++ b/src/utils.js @@ -41,8 +41,8 @@ export function resolvableComponentFactory(component) { resolve = newResolve; }); // eslint-disable-next-line no-underscore-dangle - promise._resolve = async () => { - resolve(typeof component === `function` ? await component() : component); + promise._resolve = () => { + resolve(typeof component === `function` ? component() : component); }; return promise;