Skip to content

Commit

Permalink
Fix an issue where the osc plugin didn't parse enum values correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Boberg <[email protected]>
  • Loading branch information
axelboberg committed Feb 29, 2024
1 parent 3189105 commit 0bbbd05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/osc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ async function playTrigger (item) {
over the socket
*/
const data = item?.data?.osc
const type = String(data?.type).toLowerCase()
const type = VALID_OSC_ARG_TYPES[parseInt(data?.type)]

if (!type || !(VALID_OSC_ARG_TYPES.includes(type))) {
if (!type) {
logger.error('Invalid OSC argument type')
return
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/osc/lib/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function init (htmlPath) {
'Float',
'Boolean'
],
default: 'String',
default: '0',
'ui.group': 'OSC'
},
'osc.value': {
Expand Down

0 comments on commit 0bbbd05

Please sign in to comment.