mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +01:00
fix: event table fails to render in detail view
The `EventsTable` component failed to render in the detail view, because the `onDataLoad` property is called but none was provided. See the issue for details. Add a nullcheck to `onDataLoad` before calling it. Refs #495
This commit is contained in:
parent
7eb0ca8034
commit
f357916042
@ -19,7 +19,7 @@ export default function EventsTable({ websiteId, ...props }) {
|
|||||||
|
|
||||||
function handleDataLoad(data) {
|
function handleDataLoad(data) {
|
||||||
setEventTypes([...new Set(data.map(({ x }) => x.split('\t')[0]))]);
|
setEventTypes([...new Set(data.map(({ x }) => x.split('\t')[0]))]);
|
||||||
props.onDataLoad(data);
|
props.onDataLoad?.(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user