Skip to content

Commit

Permalink
Fixed closing WebMIDI In
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Aug 30, 2019
1 parent a4b81c8 commit 0ee538a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -62,7 +62,7 @@ by running `npm remove midi-test --save-dev`.
##### CDN

<script src="https://cdn.jsdelivr.net/npm/jzz"></script> // the latest version, or
<script src="https://cdn.jsdelivr.net/npm/jzz@0.8.9"></script> // any particular version
<script src="https://cdn.jsdelivr.net/npm/jzz@0.9.0"></script> // any particular version
//...

##### CommonJS (Browserify and Node.js command line applications)
Expand Down
7 changes: 5 additions & 2 deletions javascript/JZZ.js
Expand Up @@ -13,7 +13,7 @@
})(this, function() {

var _scope = typeof window === 'undefined' ? global : window;
var _version = '0.8.9';
var _version = '0.9.0';
var i, j, k, m, n;

var _time = Date.now || function () { return new Date().getTime(); };
Expand Down Expand Up @@ -983,7 +983,10 @@
var impl = port._impl;
_pop(impl.clients, port._orig);
if (!impl.clients.length) {
if (impl.dev && impl.dev.close) impl.dev.close();
if (impl.dev) {
impl.dev.onmidimessage = null;
if (impl.dev.close) impl.dev.close();
}
impl.dev = undefined;
}
};
Expand Down
2 changes: 1 addition & 1 deletion minified/JZZ.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "jzz",
"version": "0.8.9",
"version": "0.9.0",
"description": "MIDI library for Node.js and web-browsers",
"main": "javascript/JZZ.js",
"scripts": {
Expand Down

0 comments on commit 0ee538a

Please sign in to comment.