misc: sending typed arguments ({type, value} objects) should override the widget's typeTags definition
This commit is contained in:
parent
ab39eff992
commit
19bbc1216c
2 changed files with 7 additions and 2 deletions
|
|
@ -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)}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue