osc receiver: allow receiving object args such as osc color args (#623)

This commit is contained in:
bordun 2020-05-11 19:50:23 +02:00
parent c048ede064
commit fad234301f

View file

@ -53,7 +53,7 @@ module.exports = class OscReceiver {
callback(args) {
if (typeof args !== 'object') args = [args]
if (!Array.isArray(args)) args = [args]
var preArgs = this.usePreArgs ? (this.parent.getProp('preArgs') || []) : []
if (!Array.isArray(preArgs) && preArgs !== '') preArgs = [preArgs]
if (args.length >= preArgs.length) {