Browse Source

Check for negative return

Clicky 11 years ago
parent
commit
f9ede4bae9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/app/services/influxdb/influxdbDatasource.js

+ 1 - 1
src/app/services/influxdb/influxdbDatasource.js

@@ -44,7 +44,7 @@ function (angular, _, kbn) {
           var orderIndex = lowerCaseQueryElements.indexOf("order");
           var orderIndex = lowerCaseQueryElements.indexOf("order");
           
           
           additionalGroups = lowerCaseQueryElements.slice(groupByIndex + 1,
           additionalGroups = lowerCaseQueryElements.slice(groupByIndex + 1,
-            orderIndex ? orderIndex : lowerCaseQueryElements.length).filter(function(w) {
+            orderIndex >= 0 ? orderIndex : lowerCaseQueryElements.length).filter(function(w) {
             return ! /time\(/.test(w);
             return ! /time\(/.test(w);
           });
           });
           additionalGroups = _.map(additionalGroups, function(w) {
           additionalGroups = _.map(additionalGroups, function(w) {