Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gthis #1027

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading