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 once method not passing correct arguments to callback #1857

Merged
merged 4 commits into from
Jun 29, 2018

Conversation

ricardograca
Copy link
Member

@ricardograca ricardograca commented Jun 6, 2018

Introduction

This fixes the .once method not passing the correct arguments to its callback. This bug is not present in any released versions and is only found in commits after 2ebd1af.

Proposed solution

This bug was introduced in the previous PR due to an incorrect conversion of the previous code. Since fat arrow functions don't have their own arguments and the use of the rest operator is not possible on Node 4, the changes meant that the arguments being passed were the wrong ones.

Also fixes one other test case that wasn't returning a Promise as it should, and adds a new Event#trigger() unit test for good measure.

@ricardograca ricardograca added this to To Do in Version 0.14.0 via automation Jun 6, 2018
@ricardograca ricardograca moved this from To Do to In progress in Version 0.14.0 Jun 6, 2018
@ricardograca ricardograca merged commit 9512f69 into master Jun 29, 2018
Version 0.14.0 automation moved this from In progress to Done Jun 29, 2018
@ricardograca ricardograca deleted the rg-fix-once branch June 29, 2018 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants