浏览代码

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 !== '') {