WebSockets: avoid duplicated node+addr hash function in JS code

This commit is contained in:
Luciano Iam 2020-04-12 12:07:10 +02:00 committed by Robin Gareus
parent 22199e8845
commit feeda2c19d
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 10 additions and 4 deletions

View file

@ -43,8 +43,8 @@ import { Switch, DiscreteSlider, ContinuousSlider, LogarithmicSlider,
} else if (msg.node == 'strip_plugin_param_desc') {
createStripPluginParam (msg.addr, ...msg.val);
} else if (FEEDBACK_NODES.includes(msg.node)) {
if (widgets[[msg.node, msg.addr]]) {
widgets[[msg.node, msg.addr]].value = msg.val[0];
if (widgets[msg.hash]) {
widgets[msg.hash].value = msg.val[0];
}
}
};