Skip to content

Commit

Permalink
Remove Electron check
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar committed Feb 4, 2025
1 parent c41f388 commit f0e5414
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/tracker/src/lib/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export function trackPageview(client: Client, opts: TrackPageviewOpts = {}) {
const canonical = getCanonicalUrl();
const location = canonical ?? window.location;

if (location.host === "" && navigator.userAgent.indexOf("Electron") < 0) {
// if no valid hostname (e.g. serving from local filesystem), bail out
if (location.host === "") {
return;
}

Expand Down

0 comments on commit f0e5414

Please sign in to comment.