Skip to content

Commit

Permalink
Minor modifications to #627
Browse files Browse the repository at this point in the history
  • Loading branch information
heff committed Aug 26, 2013
1 parent 75dd7c5 commit acb4a43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ vjs.formatTime = function(seconds, guide) {
gh = Math.floor(guide / 3600);

// handle invalid times
if (window['isNaN'](seconds) || seconds === Infinity) {
if (isNaN(seconds) || seconds === Infinity) {
// '-' is false for all relational operators (e.g. <, >=) so this setting
// will add the minimum number of fields specified by the guide
h = m = s = '-';
Expand Down
1 change: 1 addition & 0 deletions test/unit/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ test('should format time as a string', function(){
test('should format invalid times as dashes', function(){
equal(vjs.formatTime(Infinity, 90), '-:-');
equal(vjs.formatTime(NaN), '-:-');
// equal(vjs.formatTime(NaN, 216000), '-:--:--');
equal(vjs.formatTime(10, Infinity), '0:00:10');
equal(vjs.formatTime(90, NaN), '1:30');
});
Expand Down

0 comments on commit acb4a43

Please sign in to comment.