diff --git a/.gitignore b/.gitignore index 9ef889b7..e8fdcf88 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ node_modules/ dist/ .vscode/ coverage/ -.envrc \ No newline at end of file +.envrc +/.env diff --git a/src/platform/generic.ts b/src/platform/generic.ts index a78f3401..3dfe1e15 100644 --- a/src/platform/generic.ts +++ b/src/platform/generic.ts @@ -25,7 +25,7 @@ export default class GenericConfig implements Provider { } getLogsEndpoint(): string { - if (this.customEndpoint) { + if (isBrowser && this.customEndpoint) { return this.customEndpoint } @@ -33,7 +33,7 @@ export default class GenericConfig implements Provider { } getWebVitalsEndpoint(): string { - if (this.customEndpoint) { + if (isBrowser && this.customEndpoint) { return this.customEndpoint } diff --git a/src/platform/vercel.ts b/src/platform/vercel.ts index 1de3ee13..f08a1cf9 100644 --- a/src/platform/vercel.ts +++ b/src/platform/vercel.ts @@ -25,7 +25,7 @@ export default class VercelConfig extends GenericConfig implements Provider { } getWebVitalsEndpoint(): string { - if (this.customEndpoint) { + if (isBrowser && this.customEndpoint) { return this.customEndpoint } @@ -33,7 +33,7 @@ export default class VercelConfig extends GenericConfig implements Provider { } getLogsEndpoint(): string { - if (this.customEndpoint) { + if (isBrowser && this.customEndpoint) { return this.customEndpoint }