From ac7c5b3df7d52ddac839b1cbcfd86e9399a7323c Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 10 Apr 2019 23:38:31 +0200 Subject: [PATCH] custom-module: fix receive shorthand function when omitting host/port and sending 0 or 1 arg --- CHANGELOG.md | 3 ++- src/server/osc/index.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dd29ee6..9c82114a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ## 0.45.3 - bug fixes - - broken client sync for widgets with `split` set + - broken client sync for widgets with `split` set + - custom module: `receive` function not working when omitting host/port and sending only one argument ## 0.45.2 diff --git a/src/server/osc/index.js b/src/server/osc/index.js index d57925cf..17c9a4ff 100644 --- a/src/server/osc/index.js +++ b/src/server/osc/index.js @@ -50,8 +50,8 @@ class OscServer { receive: (host, port, address, ...args)=>{ if (host[0] === '/') { // host and port can be skipped - args.unshift(address) - args.unshift(port) + if (address !== undefined) args.unshift(address) + if (port !== undefined) args.unshift(port) address = host host = port = undefined }