Skip to content

Commit cefca02

Browse files
committed
TA-765: determines currentDeviceState from SourceClients
1 parent f0bc305 commit cefca02

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1361,10 +1361,10 @@ function UpdateDeviceState(deviceId: string) {
13611361
// bus is unlinked
13621362
for (let i = 0; i < deviceSources.length; i++) {
13631363
let deviceSource = deviceSources[i]
1364-
let currentSourceTally = currentSourceTallyData?.[deviceSource.sourceId] || []
1365-
//console.log('currentSourceTallyData', currentSourceTallyData);
1366-
//console.log('currentSourceTally', currentSourceTally);
1367-
if (currentSourceTallyData?.[deviceSource.sourceId]?.includes(bus.id)) {
1364+
1365+
let data = SourceClients[deviceSource.sourceId]?.tally?.value || []
1366+
1367+
if (data?.[deviceSource.address]?.includes(bus.id)) { //if the current source tally data includes this bus
13681368
//if the current source tally data includes this bus
13691369
//console.log('pushing', bus.label);
13701370
currentDeviceTallyData[device.id].push(bus.id)

0 commit comments

Comments
 (0)