WebSockets: improve JS client message handling code

This commit is contained in:
Luciano Iam
2020-06-01 11:11:01 +02:00
committed by Robin Gareus
parent 176d803a55
commit 8ff4bcfd68
6 changed files with 53 additions and 74 deletions

View File

@@ -54,13 +54,12 @@ export class Plugin extends AddressableComponent {
if (node == StateNode.STRIP_PLUGIN_PARAM_DESCRIPTION) {
this._parameters[addr] = new Parameter(this, addr, val);
this.notifyObservers('parameters');
return true;
} else {
if (addr in this._parameters) {
this._parameters[addr].handle(node, addr, val);
return this._parameters[addr].handle(node, addr, val);
}
}
return true;
} else if (node == StateNode.STRIP_PLUGIN_ENABLE) {
this.updateLocal('enable', val[0]);
return true;