SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
refactor: added null check while searching for dashboard (#4421)
Rajat Dabade199d52b39fb7
diff --git a/frontend/src/container/ListOfDashboard/utils.ts b/frontend/src/container/ListOfDashboard/utils.tsindex 199b356581..150aeab6c8 100644--- a/frontend/src/container/ListOfDashboard/utils.ts+++ b/frontend/src/container/ListOfDashboard/utils.ts@@ -3,16 +3,16 @@ import { Dashboard } from 'types/api/dashboard/getAll';export const filterDashboard = (searchValue: string,dashboardList: Dashboard[],-): any[] => {+): Dashboard[] => {// Convert the searchValue to lowercase for case-insensitive searchconst searchValueLowerCase = searchValue.toLowerCase();-// Use the filter method to find matching objectsreturn dashboardList.filter((item: Dashboard) => {// Convert each property value to lowercase for case-insensitive search- const itemValues = Object.values(item?.data).map((value) =>- value.toString().toLowerCase(),- );+ const itemValues = Object.values(item?.data).map((value) => {+ if (value === null || value === undefined) return '';+ return value.toString().toLowerCase();+ });// Check if any property value contains the searchValuereturn itemValues.some((value) => value.includes(searchValueLowerCase));