Fix error if plausible api is locked
parent
d734a27cd5
commit
32a5168a43
|
@ -43,7 +43,10 @@ export const apiStats = async (start, end, interval) => {
|
|||
)
|
||||
.filter((x) => !!x)
|
||||
.flatMap(({ results }, i) =>
|
||||
results.map(({ date, pageviews }) => ({ date, [names[i]]: pageviews }))
|
||||
(results || []).map(({ date, pageviews }) => ({
|
||||
date,
|
||||
[names[i]]: pageviews,
|
||||
}))
|
||||
)
|
||||
.reduce(
|
||||
(acc, el) => (
|
||||
|
|
Loading…
Reference in New Issue