Add guard in LogEventChart (#29470)

This commit is contained in:
Joshen Lim authored and GitHub committed 2024-09-24 18:04:54 +08:00
1 parent cddd29c510
commit d04cf805aa
1 file changed
+1 -1
@@ -18,7 +18,7 @@ const LogEventChart = ({ data, onBarClick, className }: LogEventChartProps) => (
data={data}
title="Logs / Time"
onBarClick={(datum: Datum | EventChartData) => {
if (!datum.timestamp) return
if (!datum?.timestamp) return
onBarClick(datum.timestamp as string)
}}
customDateFormat="MMM D, HH:mm:s"