From 5f96ec6ac2765c176645651881fa2d0ba666f58b Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Sun, 14 Jan 2018 22:54:03 +1100 Subject: Minor logic tweak --- src/js/ui.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/js/ui.js') diff --git a/src/js/ui.js b/src/js/ui.js index 08ed43ab..1ad0c43a 100644 --- a/src/js/ui.js +++ b/src/js/ui.js @@ -345,13 +345,16 @@ const ui = { return; } + // If there's a spot to display duration + const hasDuration = utils.is.element(this.elements.display.duration); + // If there's only one time display, display duration there - if (!utils.is.element(this.elements.display.duration) && this.config.displayDuration && this.paused) { + if (!hasDuration && this.config.displayDuration && this.paused) { ui.updateTimeDisplay.call(this, this.elements.display.currentTime, this.duration); } // If there's a duration element, update content - if (utils.is.element(this.elements.display.duration)) { + if (hasDuration) { ui.updateTimeDisplay.call(this, this.elements.display.duration, this.duration); } -- cgit v1.2.3