Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added safety check on uplot-xaxis logic to solve sentry issue #6869

Merged
merged 4 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions frontend/src/lib/uPlotLib/utils/getUplotChartData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import { generateColor } from './generateColor';
function getXAxisTimestamps(seriesList: QueryData[]): number[] {
const timestamps = new Set();

seriesList.forEach((series: { values: [number, string][] }) => {
series.values.forEach((value) => {
timestamps.add(value[0]);
});
seriesList.forEach((series: { values?: [number, string][] }) => {
if (series?.values) {
series.values.forEach((value) => {
timestamps.add(value[0]);
});
}
});

const timestampsArr: number[] | unknown[] = Array.from(timestamps) || [];
Expand Down
Loading