djipco / webmidi

Tame the Web MIDI API. Send and receive MIDI messages with ease. Control instruments with user-friendly functions (playNote, sendPitchBend, etc.). React to MIDI input with simple event listeners (noteon, pitchbend, controlchange, etc.).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebMidi.supported returns non boolean

SteveALee opened this issue · comments

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

returns navigator.requestMIDIAccess

code should be something like

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

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