Skip to content

Commit

Permalink
fix: check if fader exists before requesting from mixer
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Apr 24, 2020
1 parent afcc4cd commit 8c06344
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/utils/mixerConnections/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,12 @@ export class OscMixerConnection {
state.channels[0].channel.forEach((channel: any, index: number) => {
channel.auxLevel.forEach((auxLevel: any, auxIndex: number) => {
if (channel.assignedFader >= 0){
setTimeout(() => {
this.sendOutRequestAux(item.mixerMessage, auxIndex +1, state.faders[0].fader[channel.assignedFader].monitor)
},
state.faders[0].fader[channel.assignedFader].monitor * 10 + auxIndex * 100)
if (state.faders[0].fader[channel.assignedFader]) {
setTimeout(() => {
this.sendOutRequestAux(item.mixerMessage, auxIndex +1, state.faders[0].fader[channel.assignedFader].monitor)
},
state.faders[0].fader[channel.assignedFader].monitor * 10 + auxIndex * 100)
}
}
})
})
Expand Down

0 comments on commit 8c06344

Please sign in to comment.