Skip to content

Commit

Permalink
Web MIDI onmidimessage should not throw
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Oct 30, 2020
1 parent 59d8d30 commit 1124712
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -67,15 +67,15 @@ by running `npm remove midi-test --save-dev`.

```html
<script src="https://cdn.jsdelivr.net/npm/jzz"></script> // the latest version, or
<script src="https://cdn.jsdelivr.net/npm/jzz@1.1.3"></script> // any particular version
<script src="https://cdn.jsdelivr.net/npm/jzz@1.1.4"></script> // any particular version
//...
```

##### CDN (unpkg)

```html
<script src="https://unpkg.com/jzz"></script> // the latest version, or
<script src="https://unpkg.com/jzz@1.1.3"></script> // any particular version
<script src="https://unpkg.com/jzz@1.1.4"></script> // any particular version
//...
```

Expand Down
8 changes: 4 additions & 4 deletions javascript/JZZ.js
Expand Up @@ -13,7 +13,7 @@
})(this, function() {

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

var _time = Date.now || function () { return new Date().getTime(); };
Expand Down Expand Up @@ -1254,7 +1254,7 @@
info.version = info.version || '0.0';
var engine = {
_info: function() { return info; },
_openIn: function(port, name) {
_openIn: function(port) {
port._pause();
port._info = _clone(info);
port._close = function() { widget.disconnect(port); };
Expand All @@ -1272,7 +1272,7 @@
info.version = info.version || '0.0';
var engine = {
_info: function() { return info; },
_openOut: function(port, name) {
_openOut: function(port) {
port._pause();
port._info = _clone(info);
port._close = function() { port.disconnect(); };
Expand Down Expand Up @@ -2476,7 +2476,7 @@
set: function(value) {
if (value instanceof Function) {
_onmsg = value;
if (!_open) self.open();
if (!_open) try { self.open(); } catch(e) {/**/}
}
else _onmsg = null;
},
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": "1.1.3",
"version": "1.1.4",
"description": "MIDI library for Node.js and web-browsers",
"main": "javascript/JZZ.js",
"scripts": {
Expand Down

0 comments on commit 1124712

Please sign in to comment.