Commit bf82e6cd by kay delaney Committed by GitHub

Explore: Fixes error when switching from prometheus to loki data sources (#18599)

Closes #18594
Closes #18596
parent f3d1543e
...@@ -115,7 +115,7 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS ...@@ -115,7 +115,7 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS
if (initialQuery !== prevProps.initialQuery) { if (initialQuery !== prevProps.initialQuery) {
// and we have a version that differs // and we have a version that differs
if (initialQuery !== Plain.serialize(value)) { if (initialQuery !== Plain.serialize(value)) {
this.setState({ value: makeValue(initialQuery, syntax) }); this.setState({ value: makeValue(initialQuery || '', syntax) });
} }
} }
......
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