From f9ede4bae9283917712903d8ed4531473f48f917 Mon Sep 17 00:00:00 2001 From: Clicky Date: Fri, 23 May 2014 11:46:36 -0700 Subject: [PATCH] Check for negative return --- src/app/services/influxdb/influxdbDatasource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/services/influxdb/influxdbDatasource.js index a71962cef06..4f86cc5ad02 100644 --- a/src/app/services/influxdb/influxdbDatasource.js +++ b/src/app/services/influxdb/influxdbDatasource.js @@ -44,7 +44,7 @@ function (angular, _, kbn) { var orderIndex = lowerCaseQueryElements.indexOf("order"); additionalGroups = lowerCaseQueryElements.slice(groupByIndex + 1, - orderIndex ? orderIndex : lowerCaseQueryElements.length).filter(function(w) { + orderIndex >= 0 ? orderIndex : lowerCaseQueryElements.length).filter(function(w) { return ! /time\(/.test(w); }); additionalGroups = _.map(additionalGroups, function(w) {