mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
GraphNG: fix crash when trying to diff missing timeRange prop (#38654)
This commit is contained in:
parent
1be53b4f3b
commit
4e2516d12a
@ -19,7 +19,11 @@ function sameConfig(prevProps: PlotProps, nextProps: PlotProps) {
|
||||
function sameTimeRange(prevProps: PlotProps, nextProps: PlotProps) {
|
||||
let prevTime = prevProps.timeRange;
|
||||
let nextTime = nextProps.timeRange;
|
||||
return nextTime.from.valueOf() === prevTime.from.valueOf() && nextTime.to.valueOf() === prevTime.to.valueOf();
|
||||
|
||||
return (
|
||||
prevTime === nextTime ||
|
||||
(nextTime.from.valueOf() === prevTime.from.valueOf() && nextTime.to.valueOf() === prevTime.to.valueOf())
|
||||
);
|
||||
}
|
||||
|
||||
type UPlotChartState = {
|
||||
|
Loading…
Reference in New Issue
Block a user