Skip to content

Commit

Permalink
Calling WebMidi.disable() now properly disables state change listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
cotejp committed Sep 27, 2017
1 parent f6220d9 commit 80946bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/webmidi.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@
throw new Error("The Web MIDI API is not supported by your browser.");
}

this.interface.onstatechange = undefined;
this.interface = undefined; // also resets enabled, sysexEnabled
this._inputs = [];
this._outputs = [];
Expand Down Expand Up @@ -944,7 +945,7 @@

}

// Check for items to add in the existing inputs array because they jsut appeared in the MIDI
// Check for items to add in the existing inputs array because they just appeared in the MIDI
// back-end inputs list.
this.interface.inputs.forEach(function (nInput) {

Expand Down

0 comments on commit 80946bc

Please sign in to comment.