From d50282082340bd53ca82386f8115c8f97038a332 Mon Sep 17 00:00:00 2001 From: Olzzon Date: Wed, 27 Nov 2019 21:09:30 +0100 Subject: [PATCH] fix: checkOscCommand - returned always true --- src/utils/OscMixerConnection.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/OscMixerConnection.ts b/src/utils/OscMixerConnection.ts index 773f1e97..4f8df69f 100644 --- a/src/utils/OscMixerConnection.ts +++ b/src/utils/OscMixerConnection.ts @@ -222,18 +222,18 @@ export class OscMixerConnection { if (message === command) return true; let messageArray: string[] = message.split('/') let commandArray: string[] = command.split('/') + let status: boolean = true commandArray.forEach((commandPart: string, index: number) => { if (commandPart === '{channel}') { - if (typeof(parseFloat(messageArray[index])) !== 'number') { return false } + if (typeof(parseFloat(messageArray[index])) !== 'number') { status = false } } else if (commandPart === '{argument}') { - if (typeof(parseFloat(messageArray[index])) !== 'number') { return false } + if (typeof(parseFloat(messageArray[index])) !== 'number') { status = false } } else if (commandPart !== messageArray[index]) { - return false + status = false } }) - - return true + return status } sendOutMessage(oscMessage: string, channel: number, value: string | number, type: string) {