osc-listener: osc listeners not resolving "auto" address

This commit is contained in:
bordun 2020-11-09 14:53:27 +01:00
parent 16b634cb06
commit 197a0e7082
2 changed files with 8 additions and 4 deletions

View file

@ -36,7 +36,10 @@ module.exports = class OscReceiver {
if (this.address[0] !== '/') {
var parentAddress = this.parent.getProp('address') || this.parent.resolveProp('address', undefined, false, this)
if (parentAddress === 'auto') parentAddress = '/' + this.parent.getProp('id')
if (parentAddress === 'auto') {
var id = this.parent.getProp('id') || this.parent.resolveProp('id', undefined, false, this)
parentAddress = '/' + id
}
this.prefix = parentAddress
if (this.prefix[this.prefix.length - 1] !== '/') this.prefix += '/'
}