From 61460ea3a211ef4655a1ef600da324fa84979102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 14 Apr 2020 14:18:42 +0200 Subject: [PATCH] Graphite: Fixed cannot read finally of undefiend (#23512) --- public/app/plugins/datasource/graphite/query_ctrl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/graphite/query_ctrl.ts b/public/app/plugins/datasource/graphite/query_ctrl.ts index 2d6aec80db3..9afb7e6209e 100644 --- a/public/app/plugins/datasource/graphite/query_ctrl.ts +++ b/public/app/plugins/datasource/graphite/query_ctrl.ts @@ -75,12 +75,12 @@ export class GraphiteQueryCtrl extends QueryCtrl { checkOtherSegments(fromIndex: number, modifyLastSegment = true) { if (this.queryModel.segments.length === 1 && this.queryModel.segments[0].type === 'series-ref') { - return; + return Promise.resolve(); } if (fromIndex === 0) { this.addSelectMetricSegment(); - return; + return Promise.resolve(); } const path = this.queryModel.getSegmentPathUpTo(fromIndex + 1);