Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Mar 25, 2024
1 parent 8c309e4 commit 308cd56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions javascript/JZZ.midi.SMF.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@
catch (e) {
for (i = 0; i < msg.length; i++) a.push(JZZ.MIDI(msg[i]));
}
if (!a.length) _error('Not a MIDI message');
for (i = 0; i < a.length; i++) _msg(a[i]);
if (this[this._orig.length - 1].tt < t) this[this._orig.length - 1].tt = t; // end of track
if (msg.ff == 0x2f || msg[0] > 0xf0 && msg[0] != 0xf7) return this;
Expand Down
1 change: 1 addition & 0 deletions test/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ describe('functions', function() {
assert.throws(function() { trk.add(0); });
assert.throws(function() { trk.add(0, 'dummy'); });
assert.throws(function() { trk.add(0, []); });
assert.throws(function() { trk.add(0, {}); });
assert.throws(function() { trk.add(0, [[0x80, 0, 0], []]); });
assert.throws(function() { trk.tick(); });
assert.throws(function() { trk.ch(-1); });
Expand Down

0 comments on commit 308cd56

Please sign in to comment.