Skip to content

Commit

Permalink
fix(player): Removed missing window event listener once player is des…
Browse files Browse the repository at this point in the history
…troyed
  • Loading branch information
rafa8626 committed May 29, 2018
1 parent 4620151 commit a3f596b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ class Player {
this.loader.remove();
}

if (this.fill) {
window.removeEventListener('resize', this._fill.bind(this));
}

el.controls = true;
const parent = el.parentElement;
parent.parentNode.replaceChild(el, parent);
Expand Down

0 comments on commit a3f596b

Please sign in to comment.