Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Oct 23, 2017
1 parent af4cf3f commit b19efc5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/js/control-bar/time-controls/time-display.js
Expand Up @@ -63,7 +63,11 @@ class TimeDisplay extends Component {
* @private
*/
updateTextNode_() {
if (this.textNode_ && this.contentEl_ && this.contentEl_.contains(this.textNode_)) {
if (!this.contentEl_) {
return;
}

if (this.textNode_ && this.contentEl_.contains(this.textNode_)) {
this.contentEl_.removeChild(this.textNode_);
}
this.textNode_ = document.createTextNode(this.formattedTime_ || '0:00');
Expand Down Expand Up @@ -102,7 +106,7 @@ class TimeDisplay extends Component {
}

this.formattedTime_ = formattedTime;
this.requestAnimationFrame(this.updateTextNode_);
this.requestAnimationFrame(() => this.updateTextNode_());
}

/**
Expand Down

0 comments on commit b19efc5

Please sign in to comment.