chore(ui): clear eslint expression cleanup bucket

Replace remaining side-effect ternaries with explicit control flow and drop unused error bindings so the affected editors and readers satisfy the current TypeScript lint rules.

Validation: just ui lint
This commit is contained in:
James Cox
2026-04-22 17:26:48 -04:00
committed by Zach Yale
parent ac6b44e64e
commit 79eef411d2
3 changed files with 42 additions and 10 deletions
@@ -927,16 +927,28 @@ export class CbxReaderComponent implements OnInit, OnDestroy {
switch (event.key) {
case 'ArrowRight':
isRtl ? this.previousPage() : this.nextPage();
if (isRtl) {
this.previousPage();
} else {
this.nextPage();
}
event.preventDefault();
break;
case 'ArrowLeft':
isRtl ? this.nextPage() : this.previousPage();
if (isRtl) {
this.nextPage();
} else {
this.previousPage();
}
event.preventDefault();
break;
case ' ':
event.preventDefault();
event.shiftKey ? this.previousPage() : this.nextPage();
if (event.shiftKey) {
this.previousPage();
} else {
this.nextPage();
}
break;
case 'Home':
event.preventDefault();
@@ -1073,7 +1085,11 @@ export class CbxReaderComponent implements OnInit, OnDestroy {
// In RTL mode, swipe directions are reversed
const isRtl = this.readingDirection === CbxReadingDirection.RTL;
const shouldGoNext = isRtl ? delta > 0 : delta < 0;
shouldGoNext ? this.nextPage() : this.previousPage();
if (shouldGoNext) {
this.nextPage();
} else {
this.previousPage();
}
}
}