]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: doc link documents search should exclude null (#8064)
authorshamoon <4887959+shamoon@users.noreply.github.com>
Mon, 28 Oct 2024 00:13:29 +0000 (17:13 -0700)
committerGitHub <noreply@github.com>
Mon, 28 Oct 2024 00:13:29 +0000 (17:13 -0700)
src-ui/src/app/components/common/custom-field-display/custom-field-display.component.ts

index f565c95e2eb685df1e93c24abd56d1801cefad57..f541f0e47188f2ecc6752a711ed59ec30bcba831 100644 (file)
@@ -107,9 +107,9 @@ export class CustomFieldDisplayComponent implements OnInit, OnDestroy {
       .getFew(this.value, { fields: 'id,title' })
       .pipe(takeUntil(this.unsubscribeNotifier))
       .subscribe((result: Results<Document>) => {
-        this.docLinkDocuments = this.value.map((id) =>
-          result.results.find((d) => d.id === id)
-        )
+        this.docLinkDocuments = this.value
+          .map((id) => result.results.find((d) => d.id === id))
+          .filter((d) => d)
       })
   }