Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
inkfarer committed Oct 9, 2024
1 parent 4b15d9f commit 5040b7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/graphics/break/scripts/casters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}
});
Expand Down
6 changes: 5 additions & 1 deletion src/graphics/break/scripts/sceneSwitcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5040b7c

Please sign in to comment.