custom-module: fix receive shorthand function when omitting host/port and sending 0 or 1 arg
This commit is contained in:
parent
f41de95196
commit
2ead7dbc55
2 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue