Skip to content

Commit

Permalink
Fix problem with async / await Babel polyfill
Browse files Browse the repository at this point in the history
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
  • Loading branch information
maoberlehner committed May 24, 2019
1 parent 68912a1 commit e945ba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.js
Expand Up @@ -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;
Expand Down

0 comments on commit e945ba1

Please sign in to comment.