Skip to content

Commit

Permalink
fix: calling destroy without bindTo causes JS error
Browse files Browse the repository at this point in the history
  • Loading branch information
manav-razr authored and danielkaradachki committed Jan 15, 2019
1 parent dc657bc commit 2a34e12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const bind = (el, event, callback) =>
el.addEventListener && el.addEventListener(event, callback);

const unbind = (el, event, callback) =>
el.removeEventListener && el.removeEventListener(event, callback);
el && el.removeEventListener && el.removeEventListener(event, callback);

const noop = () => { /* empty */ };

Expand Down

0 comments on commit 2a34e12

Please sign in to comment.