osc: don't try to update widgets that don't have setValue method

This commit is contained in:
jean-emmanuel 2016-12-12 14:04:46 +01:00
parent 77db6be35f
commit c261a9d630

View file

@ -70,7 +70,7 @@ Osc.prototype.receive = function(data){
// compare arrays using > and < operators (both false = equality)
if (!target || !(widget[i].widgetData.target < target || widget[i].widgetData.target > target)) {
// update matching widgets
if (widget[i]) widget[i].setValue(args,{send:false,sync:true,fromExternal:!target})
if (widget[i] && widget[i].setValue) widget[i].setValue(args,{send:false,sync:true,fromExternal:!target})
}
}