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

Check for window available before setting up midi access #1

Closed
txbrown opened this issue Dec 2, 2019 · 3 comments
Closed

Check for window available before setting up midi access #1

txbrown opened this issue Dec 2, 2019 · 3 comments

Comments

@txbrown
Copy link

txbrown commented Dec 2, 2019

I would like to start to say that this library is really good and very welcome. It helps me get stuff done with MIDI and React 16+ really fast.

However using it with nextjs a SSR framework for react I had issues with window is not defined errors. This could probably be easily fixed by a simple if(typeof window !== 'undefined check before doing anything.

Let me know your thoughts.

@txbrown
Copy link
Author

txbrown commented Dec 2, 2019

TO add context I worked around this but just this would simplify my code.

@nicorobo
Copy link
Owner

nicorobo commented Dec 6, 2019

Hi @CodeNakama, thanks for the nice words, I'm really happy you like it!
Just added the check with 536502c
Updating to @0.0.10 should fix it up 👍

@nicorobo nicorobo closed this as completed Dec 6, 2019
@txbrown
Copy link
Author

txbrown commented Dec 17, 2019

Hi @nickroberts404 thanks for sorting this out. looks great. I haven't tested yet in my app but will do so soon.

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

No branches or pull requests

2 participants