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.

Check window.external before checking msTrackingProtectionEnabled

Minku Lee679a2b0460a5
diff --git a/lib/web.js b/lib/web.js
index 3cf942ab9..04e4466c1 100644
--- a/lib/web.js
+++ b/lib/web.js
@@ -52,7 +52,7 @@ export const doNotTrack = () => {
window.doNotTrack ||
navigator.doNotTrack ||
navigator.msDoNotTrack ||
- 'msTrackingProtectionEnabled' in window.external
+ (window.external && 'msTrackingProtectionEnabled' in window.external)
) {
if (
window.doNotTrack == '1' ||