Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

async support #425

Merged
merged 2 commits into from Mar 28, 2017
Merged

async support #425

merged 2 commits into from Mar 28, 2017

Conversation

kabirvirji
Copy link
Contributor

Ran into an issue with async functions since utils.getType(options) === 'Function' only checks for regular Functions, and utils.getType(options) returns AsyncFunction for Async Functions.

@bsansouci
Copy link
Collaborator

Hey @kabirvirji does the API really work when passed an async function?

@Schmavery
Copy link
Owner

I also can't imagine this is the only place that checks if a callback is === 'Function'?

@kabirvirji
Copy link
Contributor Author

@bsansouci I believe it does, that's how I've been using it

@Schmavery The === 'Function' check happens in 8 places, I can add the AsyncFunction check to all of them if you think its a good idea, let me know.

@bsansouci
Copy link
Collaborator

bsansouci commented Mar 28, 2017

Great to hear! Yeah let's update them in all 8 places to make sure you don't run into any more issues later :)

@kabirvirji
Copy link
Contributor Author

@bsansouci @Schmavery Done, let me know if anything needs a tweak.

@bsansouci bsansouci merged commit e90fb39 into Schmavery:master Mar 28, 2017
@bsansouci
Copy link
Collaborator

It looks good! Thanks a lot.

how2945ard pushed a commit to how2945ard/facebook-chat-api that referenced this pull request May 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants