Commit 84e12bdf by Waheed Ahmed

Merge pull request #5479 from edx/waheed/tnl157-fix-incorrect-relative-time

Fixed incorrect relative time value.
parents 536a815a 3bfe09b8
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
[488, '00:08:08'], [2452, '00:40:52'], [488, '00:08:08'], [2452, '00:40:52'],
[3600, '01:00:00'], [28800, '08:00:00'], [3600, '01:00:00'], [28800, '08:00:00'],
[144532, '40:08:52'], [190360, '52:52:40'], [144532, '40:08:52'], [190360, '52:52:40'],
[294008, '81:40:08'] [294008, '81:40:08'], [-5, '00:00:00']
]; ];
$.each(testTimes, function (index, times) { $.each(testTimes, function (index, times) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
function format(time, formatFull) { function format(time, formatFull) {
var hours, minutes, seconds; var hours, minutes, seconds;
if (!_.isFinite(time)) { if (!_.isFinite(time) || time < 0) {
time = 0; time = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment