Graphite: Fixed cannot read finally of undefiend (#23512)

This commit is contained in:
Torkel Ödegaard 2020-04-14 14:18:42 +02:00 committed by GitHub
parent cf1ebd5a3d
commit 61460ea3a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);