diff --git a/src/graphics/break/scripts/casters.ts b/src/graphics/break/scripts/casters.ts index 940eaa2..0fa9d86 100644 --- a/src/graphics/break/scripts/casters.ts +++ b/src/graphics/break/scripts/casters.ts @@ -27,8 +27,8 @@ casters.on('change', (newValue, oldValue) => { const newCasterIds = Object.keys(newValue); const oldCasterIds = oldValue == null ? null : Object.keys(oldValue); - const shouldRecreateCasterElements = - oldCasterIds == null + const shouldRecreateCasterElements + = oldCasterIds == null || newCasterIds.length !== oldCasterIds.length || newCasterIds.some((elem, i) => oldCasterIds[i] !== elem); @@ -61,7 +61,10 @@ casters.on('change', (newValue, oldValue) => { (casterElem.querySelector('.caster-name') as FittedText).text = caster.name; (casterElem.querySelector('.caster-twitter') as FittedText).text = caster.twitter; - if (caster.videoUrl !== oldCaster.videoUrl || (isBlank(caster.videoUrl) && caster.imageUrl !== oldCaster.imageUrl)) { + if ( + caster.videoUrl !== oldCaster.videoUrl + || (isBlank(caster.videoUrl) && caster.imageUrl !== oldCaster.imageUrl) + ) { casterElem.querySelector('.caster-visual-wrapper').innerHTML = getCasterVisual(caster); } }); diff --git a/src/graphics/break/scripts/sceneSwitcher.ts b/src/graphics/break/scripts/sceneSwitcher.ts index 0cf305b..f90a0bc 100644 --- a/src/graphics/break/scripts/sceneSwitcher.ts +++ b/src/graphics/break/scripts/sceneSwitcher.ts @@ -21,7 +21,11 @@ NodeCG.waitForReplicants(breakCastersVisible, activeBreakScene).then(() => { }); }); -function onSceneSwitch(newActiveBreakScene: ActiveBreakScene, oldActiveBreakScene: ActiveBreakScene, breakCastersVisible: boolean | null) { +function onSceneSwitch( + newActiveBreakScene: ActiveBreakScene, + oldActiveBreakScene: ActiveBreakScene, + breakCastersVisible: boolean | null +) { sceneSwitchTl.addLabel('sceneHide'); if (breakCastersVisible === false) {