]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: prevent focus error on custom field edit when switching from select
authorshamoon <4887959+shamoon@users.noreply.github.com>
Mon, 21 Oct 2024 02:19:30 +0000 (19:19 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Mon, 21 Oct 2024 02:19:30 +0000 (19:19 -0700)
src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts

index 48e5e53bbd8a856c127921ccbdae9c02ee7cd9da..b27ec9fcd314452fc2cf4eb1dce5edccbccd6114 100644 (file)
@@ -67,7 +67,7 @@ export class CustomFieldEditDialogComponent
     this.selectOptionInputs.changes
       .pipe(takeUntil(this.unsubscribeNotifier))
       .subscribe(() => {
-        this.selectOptionInputs.last.nativeElement.focus()
+        this.selectOptionInputs.last?.nativeElement.focus()
       })
   }