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

window might not be defined in node.js environment. #156

Merged
merged 1 commit into from Feb 14, 2018

Conversation

BurkovBA
Copy link
Contributor

@BurkovBA BurkovBA commented Feb 13, 2018

Hi, I was trying to do server-side rendering of my React project, using metismenu.

It was a success, except by one problem: currently metismenu assumes that window object is available, while checking for window.QUnit object in tests. Thing is, in node.js environment window is undefined, thus this code is crashing.

So I did this tiny fix, checking if window is undefined. This will enable the use of metismenu on server side and make me (and hopefully other users) happy campers.

Please, bump package version and publish a patched NPM package, if you accept this PR.

Thanks and cheers!

@onokumus onokumus merged commit 488a5ce into onokumus:master Feb 14, 2018
@BurkovBA
Copy link
Contributor Author

@onokumus Osman, could you publish the new version of this package, please? I'd like to serve the app from backend with it.

Thank you!

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.

None yet

2 participants