yaodingyd / react-flickity-component

A React.js component for using @desandro's Flickity
314 stars 51 forks source link

[SSR] Fix window undefined bug #78

Closed pr1ntr closed 5 years ago

pr1ntr commented 5 years ago

Ok, the other PR did not work for me. I don't really see how it could since require('flickity) itself will call on window as soon its imported.

This fix is confirmed working in Gatsby.

yaodingyd commented 5 years ago

Please only make changes to src/index.js.

pr1ntr commented 5 years ago

i'll create a new PR from a different branch.