Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Dec 6, 2018
1 parent 8b5c5a6 commit ab4f010
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions javascript/JZZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@
},
_close: function(port) { _engine._closeOut(port); },
_closeAll: _closeAll,
_receive: function(a) { if (impl.dev) this.dev.send(a.slice()); }
_receive: function(a) { if (impl.dev && a.length) this.dev.send(a.slice()); }
};
}
var found;
Expand Down Expand Up @@ -1036,7 +1036,7 @@
_start: function() { document.dispatchEvent(new CustomEvent('jazz-midi', { detail: ['openout', plugin.id, name] })); },
_close: function(port) { _engine._closeOut(port); },
_closeAll: _closeAll,
_receive: function(a) { var v = a.slice(); v.splice(0, 0, 'play', plugin.id); document.dispatchEvent(new CustomEvent('jazz-midi', {detail: v})); }
_receive: function(a) { if (a.length) { var v = a.slice(); v.splice(0, 0, 'play', plugin.id); document.dispatchEvent(new CustomEvent('jazz-midi', {detail: v})); } }
};
impl.plugin = plugin;
plugin.output = impl;
Expand Down
Loading

0 comments on commit ab4f010

Please sign in to comment.