Преглед изворни кода

fix: graphite query ctrl, removed unnesserary check for empty paths, fixes #7740

Torkel Ödegaard пре 8 година
родитељ
комит
b272f5144a
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      public/app/plugins/datasource/graphite/query_ctrl.ts

+ 4 - 0
public/app/plugins/datasource/graphite/query_ctrl.ts

@@ -128,6 +128,10 @@ export class GraphiteQueryCtrl extends QueryCtrl {
     }
 
     var path = this.getSegmentPathUpTo(fromIndex + 1);
+    if (path === "") {
+      return Promise.resolve();
+    }
+
     return this.datasource.metricFindQuery(path).then(segments => {
       if (segments.length === 0) {
         if (path !== '') {