mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 08:18:10 -05:00
build: fixed unit test failure
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user