Commit a00af85f by Torkel Ödegaard

build: fixed unit test failure

parent ff1b71bc
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment