mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prometheus: Fix query editor crash in response to invalid query (#94421)
* Quick fix for RenderParams Function * Removing unnecessary optional chaining Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com> * Removing unittests for RenderParams --------- Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
This commit is contained in:
@@ -96,8 +96,8 @@ export function rangeRendererLeftWithParams(
|
||||
function renderParams(model: QueryBuilderOperation, def: QueryBuilderOperationDef, innerExpr: string) {
|
||||
return (model.params ?? []).map((value, index) => {
|
||||
const paramDef = def.params[index];
|
||||
if (paramDef.type === 'string') {
|
||||
return '"' + value + '"';
|
||||
if (paramDef?.type === 'string') {
|
||||
return `"${value}"`;
|
||||
}
|
||||
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user