Skip to content

Commit

Permalink
Update graphiteSrv.js
Browse files Browse the repository at this point in the history
If 'now' is not in 'data', the result is -1, so it should be '>= 0' ...
  • Loading branch information
rsommer committed Jan 24, 2014
1 parent 76b535a commit 55e586c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/services/graphite/graphiteSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function (angular, _, $, config, kbn) {
if (date === 'now') {
return 'now';
}
else if (date.indexOf('now') > 0) {
else if (date.indexOf('now') >= 0) {
date = date.substring(3);
date = date.replace('m', 'min');
date = date.replace('M', 'mon');
Expand Down Expand Up @@ -143,4 +143,4 @@ function (angular, _, $, config, kbn) {

});

});
});

0 comments on commit 55e586c

Please sign in to comment.