Skip to content

Commit

Permalink
Merge pull request #9 from Cycling74/develop
Browse files Browse the repository at this point in the history
Merge develop into main for 1.1.0
  • Loading branch information
starakaj authored Feb 14, 2023
2 parents bdddf04 + 0d1eb03 commit 15848c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function makeInportForm(device) {
}

function attachOutports(device) {
const outports = device.messages.filter(message => message.type === RNBO.MessagePortType.Outport);
const outports = device.outports;
if (outports.length < 1) {
document.getElementById("rnbo-console").removeChild(document.getElementById("rnbo-console-div"));
return;
Expand All @@ -257,6 +257,9 @@ function attachOutports(device) {
document.getElementById("rnbo-console").removeChild(document.getElementById("no-outports-label"));
device.messageEvent.subscribe((ev) => {

// Ignore message events that don't belong to an outport
if (outports.findIndex(elt => elt.tag === ev.tag) < 0) return;

// Message events have a tag as well as a payload
console.log(`${ev.tag}: ${ev.payload}`);

Expand Down

0 comments on commit 15848c1

Please sign in to comment.