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: add quick window check #447

Merged
merged 2 commits into from
Dec 20, 2023
Merged

fix: add quick window check #447

merged 2 commits into from
Dec 20, 2023

Conversation

y-lakhdar
Copy link
Contributor

When attempting to generate the client ID, the CoveoAnalyticsClient initially tries to extract it from the browser URL by reading window.location.href. However, in server-side rendering (SSR) environments, such as when running the code on the server, the window variable is not defined. This results in a warning message being printed to the console.

Despite the window variable being undefined, the client ID is still generated randomly. However, the presence of the warning message is undesirable and can be considered an annoyance.

@fvanham-coveo fvanham-coveo merged commit 5830da9 into master Dec 20, 2023
5 checks passed
@fvanham-coveo fvanham-coveo deleted the KIT-2927 branch December 20, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants