mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 20:05:56 +08:00
fix: added safety check for query filter items (#6004)
* fix: added safety check for query filter items * fix: added a bunch of missing safety nets
This commit is contained in:
parent
cbcef2c880
commit
1024483e58
@ -140,7 +140,7 @@ function FullView({
|
|||||||
|
|
||||||
const [graphsVisibilityStates, setGraphsVisibilityStates] = useState<
|
const [graphsVisibilityStates, setGraphsVisibilityStates] = useState<
|
||||||
boolean[]
|
boolean[]
|
||||||
>(Array(response.data?.payload.data.result.length).fill(true));
|
>(Array(response.data?.payload?.data?.result?.length).fill(true));
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const {
|
const {
|
||||||
|
@ -70,7 +70,7 @@ export const useFetchKeysAndValues = (
|
|||||||
const queryFiltersWithoutId = useMemo(
|
const queryFiltersWithoutId = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
...query.filters,
|
...query.filters,
|
||||||
items: query.filters.items.map((item) => {
|
items: query.filters?.items?.map((item) => {
|
||||||
const filterWithoutId = cloneDeep(item);
|
const filterWithoutId = cloneDeep(item);
|
||||||
unset(filterWithoutId, 'id');
|
unset(filterWithoutId, 'id');
|
||||||
return filterWithoutId;
|
return filterWithoutId;
|
||||||
|
@ -67,7 +67,7 @@ function LogsExplorer(): JSX.Element {
|
|||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
currentQuery.builder.queryData.length === 1 &&
|
currentQuery.builder.queryData.length === 1 &&
|
||||||
currentQuery.builder.queryData[0].groupBy.length > 0
|
currentQuery.builder.queryData?.[0]?.groupBy?.length > 0
|
||||||
) {
|
) {
|
||||||
handleChangeSelectedView(SELECTED_VIEWS.QUERY_BUILDER);
|
handleChangeSelectedView(SELECTED_VIEWS.QUERY_BUILDER);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user