Merge branch 'master' into develop

This commit is contained in:
Torkel Ödegaard
2017-12-12 13:22:13 +01:00
2 changed files with 6 additions and 1 deletions

View File

@@ -121,7 +121,11 @@ export default class GraphiteQuery {
}
hasSelectMetric() {
return this.segments[this.segments.length - 1].value === 'select metric';
if (this.segments.length > 0) {
return this.segments[this.segments.length - 1].value === 'select metric';
} else {
return false;
}
}
addFunction(newFunc) {