mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 23:18:59 +08:00
fix: added safety check on uplot-xaxis logic to solve sentry issue (#6869)
This commit is contained in:
parent
1e61e6c2f6
commit
af6b54aeb4
@ -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) || [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user