Skip to content

Commit dddc23e

Browse files
authored
fix: don't set Sisyfos labels to empty strings (SOFIE-4196) (#406)
1 parent df590aa commit dddc23e

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

packages/timeline-state-resolver/src/integrations/sisyfos/__tests__/sisyfos.spec.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,45 @@ describe('Sisyfos', () => {
17441744
}),
17451745
])
17461746
})
1747+
1748+
it("doesn't emit commands for empty `label` string", async () => {
1749+
expect(
1750+
await compareStates(
1751+
{
1752+
channels: {
1753+
0: {
1754+
faderLevel: undefined,
1755+
label: 'asfdadf asdfadsf',
1756+
timelineObjIds: [],
1757+
pgmOn: undefined,
1758+
pstOn: undefined,
1759+
visible: undefined,
1760+
inputGain: undefined,
1761+
inputSelector: undefined,
1762+
muteOn: undefined,
1763+
},
1764+
},
1765+
resync: false,
1766+
},
1767+
{
1768+
channels: {
1769+
0: {
1770+
faderLevel: undefined,
1771+
label: '',
1772+
timelineObjIds: [],
1773+
pgmOn: undefined,
1774+
pstOn: undefined,
1775+
visible: undefined,
1776+
inputGain: undefined,
1777+
inputSelector: undefined,
1778+
muteOn: undefined,
1779+
},
1780+
},
1781+
resync: false,
1782+
}
1783+
)
1784+
).toHaveLength(0)
1785+
})
17471786
})
17481787
})
17491788

packages/timeline-state-resolver/src/integrations/sisyfos/connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export class SisyfosApi extends EventEmitter<SisyfosApiEvents> {
212212
pgmOn: typeof apiState.pgmOn === 'number' ? apiState.pgmOn === 1 : undefined,
213213
voOn: typeof apiState.pgmOn === 'number' ? apiState.pgmOn === 2 : undefined,
214214
pstOn: typeof apiState.pstOn === 'number' ? apiState.pstOn === 1 : undefined,
215-
label: apiState.label,
215+
label: apiState.label !== '' ? apiState.label : undefined,
216216
faderLevel: apiState.faderLevel,
217217
muteOn: apiState.muteOn,
218218
inputGain: apiState.inputGain,

0 commit comments

Comments
 (0)