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

Avoid calling a null event handler. #5311

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@jfoshee

jfoshee commented May 11, 2016

This bit me when I wanted to quickly register an event handler conditionally.
For example, I had something like

  events: {
      redraw: allowSelection ? (e) => this.updateSelectionRectangle() : null,
  }
Avoid calling a null event handler.
This bit me when I wanted to quickly register an event handler conditionally. 
For example, I had something like
```
  events: {
      redraw: allowSelection ? (e) => this.updateSelectionRectangle() : null,
  }
```
@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi May 12, 2016

Collaborator

Thanks for reporting!

Collaborator

TorsteinHonsi commented May 12, 2016

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment