Skip to content

Commit

Permalink
try/catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed May 12, 2024
1 parent 698cd58 commit d27c2a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/engine3.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ global.performance = { now: function() { return Date.now() - _startTime; } };

var WMT = require('web-midi-test');
WMT.sysex = false;
if (navigator) { // node 22 has a navigator object
try {
navigator.requestMIDIAccess = WMT.requestMIDIAccess;
}
else global.navigator = WMT;
catch (e) {
global.navigator = WMT;
}

var JZZ = require('..');

Expand Down

0 comments on commit d27c2a7

Please sign in to comment.