npm run format:write

This commit is contained in:
2024-10-15 21:36:53 -05:00
parent 69a3eeec9f
commit abc9445b2c
+4 -4
View File
@@ -76,15 +76,15 @@ export function messageFromBuffer(bytes: Uint8Array): [OSCMessage | undefined, U
const [address, bytesAfterAddress] = oscTypeConverterMap.s.fromBuffer(bytes); const [address, bytesAfterAddress] = oscTypeConverterMap.s.fromBuffer(bytes);
if (typeof address === 'string') { if (typeof address === 'string') {
if(bytesAfterAddress.length === 0){ if (bytesAfterAddress.length === 0) {
// NOTE(jwetzell): OSC 1.0 spec says that messages without a type string should be allowed // NOTE(jwetzell): OSC 1.0 spec says that messages without a type string should be allowed
return [ return [
{ {
address, address,
args: [] args: [],
}, },
bytesAfterAddress bytesAfterAddress,
] ];
} }
let [typeString, bytesAfterType] = oscTypeConverterMap.s.fromBuffer(bytesAfterAddress); let [typeString, bytesAfterType] = oscTypeConverterMap.s.fromBuffer(bytesAfterAddress);