Skip to content

Commit

Permalink
Fixes #18 hide time when time data is not retrieved from the redis
Browse files Browse the repository at this point in the history
  • Loading branch information
l4u committed Mar 31, 2012
1 parent 23970a7 commit fa06fee
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pub/fnordmetric.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ var FnordMetric = (function(){
}

function formatTimeOfDay(_time){
var time = new Date();
time.setTime(_time*1000);
return decPrint(time.getHours()) + ':' +
decPrint(time.getMinutes()) + ':' +
decPrint(time.getSeconds());
if(_time === null) {
return "";
} else {
var time = new Date();
time.setTime(_time*1000);
return decPrint(time.getHours()) + ':' +
decPrint(time.getMinutes()) + ':' +
decPrint(time.getSeconds());
}
}

function formatTimeRange(range){
Expand Down

0 comments on commit fa06fee

Please sign in to comment.