Sfoglia il codice sorgente

Update graphiteSrv.js

If 'now' is not in 'data', the result is -1, so it should be '>= 0' ...
Roland Sommer 12 anni fa
parent
commit
55e586c2c6
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/app/services/graphite/graphiteSrv.js

+ 2 - 2
src/app/services/graphite/graphiteSrv.js

@@ -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');
@@ -143,4 +143,4 @@ function (angular, _, $, config, kbn) {
 
   });
 
-});
+});