osc receivers: trigger update even when receiving the same value

This commit is contained in:
bordun 2018-08-30 09:07:26 +02:00
parent cbbf3e2a32
commit 1973bc9172

View file

@ -41,14 +41,12 @@ module.exports = class OscReceiver {
}
var val = args.slice(preArgs.length)
if (val.length < 2) val = val[0]
if (val !== this.value) {
try {
this.value = JSON.parse(val)
} catch (err) {
this.value = val
}
this.parent.updateProps([this.propName], this.parent)
try {
this.value = JSON.parse(val)
} catch (err) {
this.value = val
}
this.parent.updateProps([this.propName], this.parent)
}
}