diff options
author | Sam Potts <sam@potts.es> | 2018-01-22 23:20:03 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-01-22 23:20:03 +1100 |
commit | b298587c0b8c76bcf85a112585f7a9a4c1100eb8 (patch) | |
tree | fc36db859f126b5eda753f97d5aea28e7b2c0454 /src/js/utils.js | |
parent | 26e9aaceb8ad26a4a7edfcbd119d31745e02fcb0 (diff) | |
download | plyr-b298587c0b8c76bcf85a112585f7a9a4c1100eb8.tar.lz plyr-b298587c0b8c76bcf85a112585f7a9a4c1100eb8.tar.xz plyr-b298587c0b8c76bcf85a112585f7a9a4c1100eb8.zip |
Bug fix
Diffstat (limited to 'src/js/utils.js')
-rw-r--r-- | src/js/utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/utils.js b/src/js/utils.js index f82df2a4..abc2a89a 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -612,6 +612,11 @@ const utils = { // Format time to UI friendly string formatTime(time = 0, displayHours = false, inverted = false) { + // Bail if the value isn't a number + if (!utils.is.number(time)) { + return; + } + // Format time component to add leading zero const format = value => `0${value}`.slice(-2); |