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:
co-authored by
Nick Richmond
parent
c05bfdf71f
commit
bfa1f03315
@@ -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