Browse Source

build: fixed broken elastic unit test

Torkel Ödegaard 8 years ago
parent
commit
0831238420
1 changed files with 1 additions and 2 deletions
  1. 1 2
      public/app/plugins/datasource/elasticsearch/index_pattern.ts

+ 1 - 2
public/app/plugins/datasource/elasticsearch/index_pattern.ts

@@ -27,11 +27,10 @@ export class IndexPattern {
 
     var intervalInfo = intervalMap[this.interval];
     var start = moment(from).utc().startOf(intervalInfo.startOf);
-    var startEpoch = start.valueOf();
     var endEpoch = moment(to).utc().startOf(intervalInfo.startOf).valueOf();
     var indexList = [];
 
-    while (startEpoch <= endEpoch) {
+    while (start.valueOf() <= endEpoch) {
       indexList.push(start.format(this.pattern));
       start.add(1, intervalInfo.amount);
     }