Skip to content

Commit

Permalink
fix out of range errors
Browse files Browse the repository at this point in the history
  • Loading branch information
YeonV committed Oct 5, 2024
1 parent e3c053a commit b827acb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Midi/MidiListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const MIDIListener = () => {
Object.entries(midiMapping[0]).forEach(([_key, value]) => {
const buttonNumber = value.buttonNumber
if (!value.command || value.command === 'none' || buttonNumber === -1) {
if (output) {
if (output && buttonNumber !== -1) {
try {
output.send([0x90, buttonNumber, lpType === 'LPX' ? 0x00 : 0x0C])
} catch (error) {
Expand Down

0 comments on commit b827acb

Please sign in to comment.