mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 14:45:56 +08:00
fix: add safety checks to handle null response from query range API (#4939)
This commit is contained in:
parent
64bf580323
commit
e78e1d4b63
@ -59,7 +59,7 @@ function WidgetGraphComponent({
|
||||
|
||||
const lineChartRef = useRef<ToggleGraphProps>();
|
||||
const [graphVisibility, setGraphVisibility] = useState<boolean[]>(
|
||||
Array(queryResponse.data?.payload?.data.result.length || 0).fill(true),
|
||||
Array(queryResponse.data?.payload?.data?.result?.length || 0).fill(true),
|
||||
);
|
||||
const graphRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
|
@ -100,7 +100,7 @@ export const getUPlotChartOptions = ({
|
||||
y: {
|
||||
...getYAxisScale({
|
||||
thresholds,
|
||||
series: apiResponse?.data.newResult.data.result,
|
||||
series: apiResponse?.data?.newResult?.data?.result || [],
|
||||
yAxisUnit,
|
||||
softMax,
|
||||
softMin,
|
||||
|
Loading…
x
Reference in New Issue
Block a user