Skip to content

Commit

Permalink
fix gthis
Browse files Browse the repository at this point in the history
  • Loading branch information
guitavano committed Feb 26, 2025
1 parent feb1e02 commit 4b9bb14
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions analytics/components/DecoAnalytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ declare global {
}
// This function should be self contained, because it is stringified!
const snippet = (() => {
const gThis = globalThis as unknown as { plausibleInitialized: boolean };
gThis.plausibleInitialized = false;
// @ts-ignore untyped globalThis var
globalThis.plausibleInitialized = false;
return () => {
if (gThis.plausibleInitialized) return;
gThis.plausibleInitialized = true;
// @ts-ignore untyped globalThis var
if (globalThis.plausibleInitialized) return;
// @ts-ignore untyped globalThis var
globalThis.plausibleInitialized = true;

// Flags and additional dimensions
const props: Record<string, string> = {};
Expand Down

0 comments on commit 4b9bb14

Please sign in to comment.