Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Fix singular views per visit (#6088)

Uku Tahtc0a0ba748070
diff --git a/assets/js/dashboard/stats/graph/top-stats.js b/assets/js/dashboard/stats/graph/top-stats.js
index eff64a5bb2..47b818a098 100644
--- a/assets/js/dashboard/stats/graph/top-stats.js
+++ b/assets/js/dashboard/stats/graph/top-stats.js
@@ -38,7 +38,7 @@ export default function TopStats({
function tooltip(stat) {
let statName = stat.name.toLowerCase()
const warning = warningText(stat.graph_metric, site)
- statName = stat.value === 1 ? statName.slice(0, -1) : statName
+ statName = stat.value === 1 ? statName.replace(/s$/, '') : statName
return (
<div>
@@ -164,7 +164,6 @@ export default function TopStats({
'border-r lg:border-r-0': index % 2 === 0
}
)
-
return (
<Tooltip
key={stat.name}