Skip to content

Commit 04701fc

Browse files
authored
fix(datasource.ts): fix that can't use grafana variables (#4)
1 parent 01f6db3 commit 04701fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datasource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ toMetricFindValue(rsp: DataQueryResponse): MetricFindValue[] {
8585

8686
overrideGrafanaVars(scopedVars: ScopedVars) {
8787
// Replace time unit to match Datalayers
88-
if (scopedVars.__interval.text) {
88+
if (scopedVars.__interval && scopedVars.__interval.text) {
8989
const v = this.replaceTimeUnit(scopedVars.__interval.value);
9090
scopedVars.__interval.value = v;
9191
}

0 commit comments

Comments
 (0)