From 69583f0cd06ae3bd5769da668b345e4351ccc78c Mon Sep 17 00:00:00 2001 From: jsers Date: Tue, 23 May 2023 17:19:14 +0800 Subject: [PATCH] refactor(PromQLInput): compatible with no datasourceValue --- src/components/PromQLInput/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PromQLInput/index.tsx b/src/components/PromQLInput/index.tsx index 7dab6c316..34748b18e 100644 --- a/src/components/PromQLInput/index.tsx +++ b/src/components/PromQLInput/index.tsx @@ -80,7 +80,7 @@ const ExpressionInput = ( completeEnabled ? { remote: { - url: `${url}/${datasourceValue}`, + url: datasourceValue ? `${url}/${datasourceValue}` : url, fetchFn: (resource, options = {}) => { const params = options.body?.toString(); const search = params ? `?${params}` : '';