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

SSR support: Don't import popper if window undefined #816

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

winton
Copy link

@winton winton commented Jul 5, 2018

Please makes sure these boxes are checked before submitting your PR, thank you!

  • Make sure you are merging your commits to master branch.
  • Add some descriptions and refer relative issues for you PR.
  • Rebase your commits to make your pull request meaningful.
  • Make sure that your changes pass npm test, npm run lint and npm run build.

Changes in this pull request

  • Checking that window is defined before requiring and exporting popper-mixins

@winton winton changed the title Don't import popper if window undefined (SSR support) SSR support: Don't import popper if window undefined Jul 5, 2018
@fatlinesofcode
Copy link

Hi @winton I've tried to add this fix to my nextjs project but am still receiving error popper window error

{ ReferenceError: window is not defined
    at /Users/phil/Sites/git/clients/brandcrush/front/node_modules/element-react-ssr/dist/npm/es5/libs/utils/popper.js:57:16
    at root (/Users/phil/Sites/git/clients/brandcrush/front/node_modules/element-react-ssr/dist/npm/es5/libs/utils/popper.js:48:26)
    at Object.<anonymous> (/Users/phil/Sites/git/clients/brandcrush/front/node_modules/element-react-ssr/dist/npm/es5/libs/utils/popper.js:53:3)

Have you attempted to use this with nextjs?

@arthurhamon
Copy link

Can someone work on this fix ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants