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: preserve async listeners with ".once()" #17

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Conversation

* @note Return the result of the original listener.
* This way this wrapped preserves listeners that are async.
*/
return listener.apply(this, data)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By returning this listener call, this wrapped will respect the sync/async nature of the original listener, and can, itself, be awaited.

@kettanaito kettanaito merged commit b28d07d into main Sep 21, 2023
1 check passed
@kettanaito kettanaito deleted the fix/once-async branch September 21, 2023 08:23
@kettanaito
Copy link
Member Author

Released: v0.5.1 🎉

This has been released in v0.5.1!

Make sure to always update to the latest version (npm i strict-event-emitter@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

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.

1 participant