From 935b3edced5f2932734b0377664b2e42e4880372 Mon Sep 17 00:00:00 2001 From: James Cox Date: Wed, 25 Mar 2026 21:57:12 -0500 Subject: [PATCH] chore(ui): clear eslint optional chain assertion bucket Replace non-null assertions on optional chains in the library and shelf menu actions with direct entity assertions so the commands keep their current assumptions without tripping the stricter TypeScript lint rule. Validation: just ui lint --- .../features/book/service/library-shelf-menu.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/features/book/service/library-shelf-menu.service.ts b/frontend/src/app/features/book/service/library-shelf-menu.service.ts index 50095d2f8..6348c6c36 100644 --- a/frontend/src/app/features/book/service/library-shelf-menu.service.ts +++ b/frontend/src/app/features/book/service/library-shelf-menu.service.ts @@ -85,7 +85,7 @@ export class LibraryShelfMenuService { severity: 'success', }, accept: () => { - this.libraryService.refreshLibrary(entity?.id!).subscribe({ + this.libraryService.refreshLibrary(entity!.id).subscribe({ complete: () => { this.messageService.add({severity: 'info', summary: this.t.translate('common.success'), detail: this.t.translate('book.shelfMenuService.toast.libraryRefreshSuccessDetail')}); }, @@ -148,7 +148,7 @@ export class LibraryShelfMenuService { accept: () => { const loader = this.loadingService.show(this.t.translate('book.shelfMenuService.loading.deletingLibrary', {name: entity?.name})); - this.libraryService.deleteLibrary(entity?.id!) + this.libraryService.deleteLibrary(entity!.id) .pipe(finalize(() => this.loadingService.hide(loader))) .subscribe({ complete: () => { @@ -212,7 +212,7 @@ export class LibraryShelfMenuService { severity: 'secondary' }, accept: () => { - this.shelfService.deleteShelf(entity?.id!).subscribe({ + this.shelfService.deleteShelf(entity!.id).subscribe({ complete: () => { this.router.navigate(['/']); this.messageService.add({severity: 'info', summary: this.t.translate('common.success'), detail: this.t.translate('book.shelfMenuService.toast.shelfDeletedDetail')}); @@ -284,7 +284,7 @@ export class LibraryShelfMenuService { severity: 'secondary' }, accept: () => { - this.magicShelfService.deleteShelf(entity?.id!).subscribe({ + this.magicShelfService.deleteShelf(entity!.id).subscribe({ complete: () => { this.router.navigate(['/']); this.messageService.add({severity: 'info', summary: this.t.translate('common.success'), detail: this.t.translate('book.shelfMenuService.toast.magicShelfDeletedDetail')});