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

Remove unnecessary calls to off() that trigger deprecation warnings #1725

Merged
merged 1 commit into from Dec 21, 2018
Merged

Remove unnecessary calls to off() that trigger deprecation warnings #1725

merged 1 commit into from Dec 21, 2018

Conversation

richard-viney
Copy link
Contributor

@richard-viney richard-viney commented Dec 20, 2018

Followup to #1722.

@Turbo87
Copy link
Collaborator

Turbo87 commented Dec 21, 2018

why do you think that these are unnecessary? wouldn't it lead to memory-leaks if we removed them?

@richard-viney
Copy link
Contributor Author

Believe it's ok because the original code was immediately putting the event handlers back on after just removing them.

I tested that multiple calls to on() with identical arguments doesn't result in the specified function being called multiple times, i.e. it doesn't allow the same [context, function] pair to be registered more than once. That means that the off() calls removed in this PR weren't ever doing much anyway.

Thoughts?

Copy link
Member

@marcoow marcoow left a comment

Choose a reason for hiding this comment

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

I think this is good - I can see no reason why this was even added in the first place.

@josemarluedke
Copy link
Contributor

@marcoow @Turbo87 @jessica-jordan Can we get a release containing this change? Thanks.

@robclancy
Copy link

Someone press the release button...

@jayjayjpg
Copy link
Contributor

@josemarluedke @robclancy I'm on it!

@quaertym
Copy link
Contributor

@jessica-jordan Please push to npm.

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.

7 participants