Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tutkli committed Feb 22, 2024
1 parent d72dd88 commit a6f5efd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/ngx-sonner/src/lib/toaster.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export class NgxSonnerToaster implements OnDestroy {
) {
this.isFocusWithinRef.set(false);
if (this.lastFocusedElementRef()) {
this.lastFocusedElementRef()!.focus({ preventScroll: true });
this.lastFocusedElementRef()?.focus({ preventScroll: true });
this.lastFocusedElementRef.set(null);
}
}
Expand All @@ -242,7 +242,7 @@ export class NgxSonnerToaster implements OnDestroy {
if (!this.listRef?.nativeElement) return;

const isHotkeyPressed = this.hotKey().every(
key => (event as any)[key] || event.code === key
key => (event as never)[key] || event.code === key
);

if (isHotkeyPressed) {
Expand Down

0 comments on commit a6f5efd

Please sign in to comment.