From 5040b7c4cadae53d368e511c06f7a81ab550cd79 Mon Sep 17 00:00:00 2001 From: inkfarer Date: Wed, 9 Oct 2024 07:28:28 +0300 Subject: [PATCH] Fix lint errors --- src/graphics/break/scripts/casters.ts | 9 ++++++--- src/graphics/break/scripts/sceneSwitcher.ts | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) 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) {