Navigation Menu

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

Don't access window if unavailable #612

Merged
merged 1 commit into from Mar 7, 2018

Conversation

shaunchurch
Copy link
Contributor

I'm using Reactotron with the Redux plugin in a React.js app with server side rendering.

The Redux store is configured on the client and on the server, however because reactotron-react-js attempts to access window on module import this fails server side. I don't plan to use Reactotron in production or on the server, but not being able to import the module at all during store configuration is problematic.

I've just added a check for window as a straightforward solution, but understand that this might not be suitable depending on what else you plan to use the userAgent for.

Hope it's helpful.

Copy link
Contributor

@skellock skellock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me! Appreciate the PR!

@skellock skellock merged commit 8993004 into infinitered:master Mar 7, 2018
@skellock skellock added the bug 🪲 Nope, this is wrong. label Mar 12, 2018
@skellock skellock added this to the 2.0.0-alpha.3 milestone Mar 12, 2018
joshuayoes pushed a commit that referenced this pull request Jan 17, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this pull request Jan 27, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this pull request Jan 30, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this pull request Feb 1, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
silasjmatson pushed a commit that referenced this pull request Mar 14, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Nope, this is wrong.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants