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 server-side rendering #7

Merged
merged 1 commit into from
Feb 28, 2019
Merged

Conversation

LoicMahieu
Copy link
Contributor

@baptwaels
Copy link

baptwaels commented Oct 27, 2016

Hi,

Are you gonna release this modification to prevent server side rendering errors ?

It would really help on halogen !
thank you

@zvictor
Copy link

zvictor commented Mar 19, 2017

This one would be highly appreciated.

module.exports = document.createElement('div').style;
var canUseDOM = require('./canUseDOM');

module.exports = canUseDOM && document.createElement('div').style;
Copy link

Choose a reason for hiding this comment

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

I am having issues with this line of code as it sometimes evaluates to an object, sometimes to a false.
The following should be safer:

module.exports = (canUseDOM && document.createElement('div').style) || {};

@hdngr
Copy link

hdngr commented Sep 4, 2017

For posterity - I merged this one here: https://github.com/hdngr/domkit

Thanks @yuanyan and @LoicMahieu!

@FrenchMajesty
Copy link

It would be nice to have this implemented. I'm still struggling with server pre-rendering despite a fix being written for it over a year ago.

@TaeKimJR
Copy link

TaeKimJR commented Oct 9, 2017

@yuanyan Curious why this hasn't been merged in?

@yuanyan yuanyan merged commit 85fa883 into yuanyan:master Feb 28, 2019
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.

7 participants