mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
remove urlpath conditional
This commit is contained in:
parent
05ece6a4d0
commit
db845d6c04
@ -53,14 +53,12 @@ export default function RealtimeUrls({ websiteDomain, data = {} }) {
|
||||
const pages = percentFilter(
|
||||
pageviews
|
||||
.reduce((arr, { urlPath }) => {
|
||||
if (urlPath?.startsWith('/')) {
|
||||
const row = arr.find(({ x }) => x === urlPath);
|
||||
const row = arr.find(({ x }) => x === urlPath);
|
||||
|
||||
if (!row) {
|
||||
arr.push({ x: urlPath, y: 1 });
|
||||
} else {
|
||||
row.y += 1;
|
||||
}
|
||||
if (!row) {
|
||||
arr.push({ x: urlPath, y: 1 });
|
||||
} else {
|
||||
row.y += 1;
|
||||
}
|
||||
return arr;
|
||||
}, [])
|
||||
|
Loading…
Reference in New Issue
Block a user