From 0e86045317cf9559306dd8898898c17ee9d3ae81 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 19 May 2017 11:15:33 +0200 Subject: [PATCH] osc: fix poorly written code --- app/main/osc.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/main/osc.js b/app/main/osc.js index f2e01109..09f8d8b7 100644 --- a/app/main/osc.js +++ b/app/main/osc.js @@ -165,14 +165,12 @@ module.exports = { var message = [] + if (!Array.isArray(args)) args = [args] if (typeof args=='object' && args!==null) { - for (i in args) { + for (var i in args) { var arg = parseArg(args[i],precision) if (arg!=null) message.push(arg) } - } else if (args!==null){ - var arg = parseArg(args[i],precision) - if (arg!=null) message.push(arg) } var data = oscOutFilter({address:address, args: message, host: host, port: port})