Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
receiver: don't remove iframe if already removed
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Nov 14, 2016
1 parent 96c5d05 commit 6bfac88
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/scripts/receiver/iframe-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ module.exports = (function(window, undefined) {
if (this.el.classList.contains('show')) {
this.el.classList.remove('show');
window.setTimeout(function() {
this.el.parentNode.removeChild(this.el);
}.bind(this), 1001); // This is more reliable than relying on transitionend
if (this.el.parentNode) {
this.el.parentNode.removeChild(this.el);
}
}.bind(this), 1001); // This is more reliable than relying on transitionend
} else {
this.el.parentNode.removeChild(this.el);
if (this.el.parentNode) {
this.el.parentNode.removeChild(this.el);
}
}
};

Expand Down

0 comments on commit 6bfac88

Please sign in to comment.