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(config): add SSR guard for window.navigator #1756

Merged

Conversation

metonym
Copy link
Contributor

@metonym metonym commented Feb 19, 2024

Fixes #1755

window.navigator is a browser API. This PR adds a check so that Carbon Charts can be used with SSR.

Updates

  • fix(config): add SSR guard for window.navigator

Demo screenshot or recording

@metonym metonym requested review from theiliad and a team as code owners February 19, 2024 18:29
Copy link

netlify bot commented Feb 19, 2024

Deploy Preview for carbon-charts-core ready!

Name Link
🔨 Latest commit e3bb38f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-core/deploys/65d39e1a8658c10008cd3e8d
😎 Deploy Preview https://deploy-preview-1756--carbon-charts-core.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Feb 19, 2024

Deploy Preview for carbon-charts-angular ready!

Name Link
🔨 Latest commit e3bb38f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-angular/deploys/65d39e1a89a9990008c1a4d3
😎 Deploy Preview https://deploy-preview-1756--carbon-charts-angular.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Feb 19, 2024

Deploy Preview for carbon-charts-react ready!

Name Link
🔨 Latest commit e3bb38f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-react/deploys/65d39e1ab23ff100088b3337
😎 Deploy Preview https://deploy-preview-1756--carbon-charts-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@theiliad theiliad merged commit 9625ae3 into carbon-design-system:master Feb 19, 2024
4 checks passed
@metonym metonym deleted the fix-ssr-window-navigator branch February 19, 2024 19:06
@metonym
Copy link
Contributor Author

metonym commented Feb 19, 2024

Thanks for the quick release.

I've confirmed that this is now fixed after upgrading to the 1.14.2 patch.

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.

[Bug]: Use of window.navigator breaks SSR usage
2 participants