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: trigger not handling all event handlers #53
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This method is executed even if the next handler is deleted.
However, if it check individually, it will cost a lot of checking.
The example seems a little different. const arr = [0, 1, 2];
const handlers = [...arr];
handlers.forEach(handler => {
arr.splice(0, 1);
console.log(handler);
}); |
@daybrush |
You are right. The method you said is a good one because it doesn't get any errors. What I'm talking about is a future problem. Events will continue to be triggered even after the event is released or destroyed. |
I'm fixing the issue of the handler removing itself here especially by calling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
Issue
#52
Details
This fixes #52