Skip to content

Commit

Permalink
with the deferred init of custom events, prevent an immediately remov…
Browse files Browse the repository at this point in the history
…ed handler from blowing up
  • Loading branch information
evs-chris committed Jun 4, 2021
1 parent bd995f1 commit 898e386
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/view/items/element/ElementEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ class CustomEvent {
unbind() {}

unrender() {
this.handler.teardown();
if (this.handler) this.handler.teardown();
else runloop.scheduleTask(() => this.handler && this.handler.teardown());
}
}

Expand Down

0 comments on commit 898e386

Please sign in to comment.