Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Prevent undefined strings in tracker.

Mike Caoa5362d919785
diff --git a/src/tracker/index.js b/src/tracker/index.js
index ace1d7c23..1c2fcc205 100644
--- a/src/tracker/index.js
+++ b/src/tracker/index.js
@@ -33,6 +33,10 @@
/* Helper functions */
const encode = str => {
+ if (!str) {
+ return undefined;
+ }
+
try {
const result = decodeURI(str);