mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 15:56:07 +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<
|
||||
boolean[]
|
||||
>(Array(response.data?.payload.data.result.length).fill(true));
|
||||
>(Array(response.data?.payload?.data?.result?.length).fill(true));
|
||||
|
||||
useEffect(() => {
|
||||
const {
|
||||
|
@ -70,7 +70,7 @@ export const useFetchKeysAndValues = (
|
||||
const queryFiltersWithoutId = useMemo(
|
||||
() => ({
|
||||
...query.filters,
|
||||
items: query.filters.items.map((item) => {
|
||||
items: query.filters?.items?.map((item) => {
|
||||
const filterWithoutId = cloneDeep(item);
|
||||
unset(filterWithoutId, 'id');
|
||||
return filterWithoutId;
|
||||
|
@ -67,7 +67,7 @@ function LogsExplorer(): JSX.Element {
|
||||
}
|
||||
if (
|
||||
currentQuery.builder.queryData.length === 1 &&
|
||||
currentQuery.builder.queryData[0].groupBy.length > 0
|
||||
currentQuery.builder.queryData?.[0]?.groupBy?.length > 0
|
||||
) {
|
||||
handleChangeSelectedView(SELECTED_VIEWS.QUERY_BUILDER);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user