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

WebMidi.supported returns non boolean #417

Closed
SteveALee opened this issue Apr 21, 2024 · 1 comment
Closed

WebMidi.supported returns non boolean #417

SteveALee opened this issue Apr 21, 2024 · 1 comment
Assignees

Comments

@SteveALee
Copy link

SteveALee commented Apr 21, 2024

  get supported() {
    return (typeof navigator !== "undefined" && navigator.requestMIDIAccess);
  }

returns navigator.requestMIDIAccess

code should be something like

  get supported() {
    return (typeof navigator !== "undefined" && !!navigator.requestMIDIAccess);
  }
@djipco
Copy link
Owner

djipco commented Apr 21, 2024

Thanks for reporting. Fixed in 8d42de2 (available in release 3.1.9).

@djipco djipco closed this as completed Apr 21, 2024
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