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

fix callback error with promise #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix callback error with promise #48

wants to merge 1 commit into from

Conversation

jeylost
Copy link

@jeylost jeylost commented Apr 7, 2021

I didn't find promises support in the docs. But checking the code, I saw promise wrappers and tried to use them in my code. But there is a scenario when it will become an error. In the code, if statements use the callback function before the callback exists' check. I propose to create a promise wrapper as a default parameter and always return the result.

@coveralls
Copy link

Coverage Status

Coverage increased (+5.2%) to 63.291% when pulling 80992db on jeylost:callback-promise-error into 953cc47 on ghdna:master.

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

Successfully merging this pull request may close these issues.

2 participants