mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
Fixed data being undefined.
This commit is contained in:
parent
e98c0a62e3
commit
b663146ad5
@ -73,13 +73,13 @@ export function MetricsTable({
|
||||
|
||||
const filteredData = useMemo(() => {
|
||||
if (data) {
|
||||
let items;
|
||||
let items = data;
|
||||
|
||||
if (dataFilter) {
|
||||
if (Array.isArray(dataFilter)) {
|
||||
items = dataFilter.reduce((arr, filter) => {
|
||||
return filter(arr);
|
||||
}, data);
|
||||
}, items);
|
||||
} else {
|
||||
items = dataFilter(data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user