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

Fixed incorrect relative time value.
This commit is contained in:
Waheed Ahmed
2014-10-03 16:32:00 +05:00
2 changed files with 2 additions and 2 deletions

View File

@@ -33,7 +33,7 @@
[488, '00:08:08'], [2452, '00:40:52'],
[3600, '01:00:00'], [28800, '08:00:00'],
[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) {

View File

@@ -12,7 +12,7 @@
function format(time, formatFull) {
var hours, minutes, seconds;
if (!_.isFinite(time)) {
if (!_.isFinite(time) || time < 0) {
time = 0;
}