Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: can't use async functions as resolvers #15

Open
aearly opened this issue Sep 14, 2018 · 0 comments
Open

bug: can't use async functions as resolvers #15

aearly opened this issue Sep 14, 2018 · 0 comments

Comments

@aearly
Copy link

aearly commented Sep 14, 2018

This doesn't work as expected:

fount.register('foo', async (config) => {
  var foo = await getFoo(config).catch(() =>  null)
  return foo
})

What is registered is the entire async function, rather than its resolved value, which is surprising.

Luckily, this is already fixed by #14 . Lodash 3's isFunction returns false for async functions, fauxdash's version works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant