diff --git a/src/QueryEditor.tsx b/src/QueryEditor.tsx index 394e706..0c2d8d5 100644 --- a/src/QueryEditor.tsx +++ b/src/QueryEditor.tsx @@ -32,7 +32,7 @@ export class QueryEditor extends PureComponent { const { query, onChange, onRunQuery } = this.props; //todo: need to implement some kind of hook system to alter a query from modules - if (queryBuilderOptions.builder.intervals.length === 0) { + if (Array.isArray(queryBuilderOptions.builder.intervals) && queryBuilderOptions.builder.intervals.length === 0) { queryBuilderOptions.builder.intervals.push('${__from:date:iso}/${__to:date:iso}'); } //workaround (https://github.com/grafana/grafana/issues/30013)