misc: sending typed arguments ({type, value} objects) should override the widget's typeTags definition

This commit is contained in:
jean-emmanuel 2021-12-31 12:12:18 +01:00
parent ab39eff992
commit 19bbc1216c
2 changed files with 7 additions and 2 deletions

View file

@ -46,6 +46,8 @@ class OscServer {
if (arg === null) return null
if (typeof arg === 'object' && arg.type && arg.type.length === 1) return arg
if (type && type[0].match(/[bhtdscrmifTFNI]/)) {
type = type[0]
@ -75,8 +77,6 @@ class OscServer {
return {type: arg ? 'T' : 'F'}
case 'string':
return {type: 's', value:arg}
case 'object':
if (arg.type && arg.type.length === 1) return arg
default:
return {type: 's', value:JSON.stringify(arg)}
}