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.

fix tracker localStorage DOMException in data URLs

yArnabe656f0b6374
diff --git a/src/tracker/index.js b/src/tracker/index.js
index d4446560a..e1c269734 100644
--- a/src/tracker/index.js
+++ b/src/tracker/index.js
@@ -3,10 +3,10 @@
screen: { width, height },
navigator: { language },
location,
- localStorage,
document,
history,
} = window;
+ const localStorage = location.href.startsWith('data:') ? undefined : window.localStorage
const { hostname, href } = location;
const { currentScript, referrer } = document;