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

Support server side rendering #365

Merged
merged 1 commit into from
Aug 3, 2016
Merged

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Aug 3, 2016

Fixes #364. This PR adds conditional checks for window and localStorage.

@@ -6,10 +6,10 @@ if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {
// Safari private mode throws when writing to localStorage
// https://github.com/TechnologyAdvice/stardust/issues/332
try {
localStorage.debug = localStorage.debug || 'stardust:*'
if (typeof localStorage === 'object') localStorage.debug = localStorage.debug || 'stardust:*'
Copy link
Member Author

Choose a reason for hiding this comment

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

Prevent ReferenceError: localStorage is not defined

@athurman
Copy link
Contributor

athurman commented Aug 3, 2016

LGTM 🐙

@codecov-io
Copy link

Current coverage is 92.60% (diff: 100%)

Merging #365 into master will not change coverage

@@             master       #365   diff @@
==========================================
  Files            63         63          
  Lines           811        811          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits            751        751          
  Misses           60         60          
  Partials          0          0          

Powered by Codecov. Last update 22895e4...e3e533c

@levithomason levithomason merged commit 2fa8012 into master Aug 3, 2016
@levithomason levithomason deleted the feature/server-rendering branch August 3, 2016 21:28
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