Skip to content

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

Use empty string in favour of regex in `String.replace`

Uku Tahtfc63d036e2f6
diff --git a/assets/js/dashboard/stats/graph/graph-util.js b/assets/js/dashboard/stats/graph/graph-util.js
index 3e67e42732..c0729fe282 100644
--- a/assets/js/dashboard/stats/graph/graph-util.js
+++ b/assets/js/dashboard/stats/graph/graph-util.js
@@ -19,7 +19,7 @@ export const dateFormatter = (interval, longForm) => {
date = new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5])
var hours = Intl.DateTimeFormat(navigator.language, { hour: 'numeric' }).format(date);
if (uses12hTime) {
- hours = hours.toLowerCase().replace(/\s/g, "");
+ hours = hours.toLowerCase().replace(" ", "");
} else {
hours = hours.concat("h");
}