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

callbacks be unbound unexpectedly. #31

Merged
merged 2 commits into from
Mar 22, 2018
Merged

callbacks be unbound unexpectedly. #31

merged 2 commits into from
Mar 22, 2018

Conversation

cathcheeno
Copy link
Contributor

Bug

Given two riot tags listen same event and mounted like below.

<div>
  <sample-a />
  <sample-b />
</div>

// A.tag
this.riotxChange('event', () => {
  // callback for A
});

// B.tag
this.riotxChange('event', () => {
  // callback for B
});

The problem is that the callback for B is unbound unexpectedly when tag A is unmounted. This is because the two tags(A and B) share the context of _riotx_change_handlers.

@fkei fkei merged commit 622b3bd into develop Mar 22, 2018
@fkei fkei deleted the bugfix_unbind branch March 22, 2018 05:52
@fkei
Copy link
Contributor

fkei commented Mar 22, 2018

👍

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