diff options
-rw-r--r-- | client/src/app/shared/shared-search/find-in-bulk.service.ts | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-search/find-in-bulk.service.ts b/client/src/app/shared/shared-search/find-in-bulk.service.ts index d2f8c3213..d6ee04379 100644 --- a/client/src/app/shared/shared-search/find-in-bulk.service.ts +++ b/client/src/app/shared/shared-search/find-in-bulk.service.ts | |||
@@ -80,13 +80,18 @@ export class FindInBulkService { | |||
80 | map(result => result.response.data), | 80 | map(result => result.response.data), |
81 | map(data => data.find(finder)) | 81 | map(data => data.find(finder)) |
82 | ) | 82 | ) |
83 | .subscribe(result => { | 83 | .subscribe({ |
84 | if (!result) { | 84 | next: result => { |
85 | obs.error(new Error($localize`Element ${param} not found`)) | 85 | if (!result) { |
86 | } else { | 86 | obs.error(new Error($localize`Element ${param} not found`)) |
87 | return | ||
88 | } | ||
89 | |||
87 | obs.next(result) | 90 | obs.next(result) |
88 | obs.complete() | 91 | obs.complete() |
89 | } | 92 | }, |
93 | |||
94 | error: err => obs.error(err) | ||
90 | }) | 95 | }) |
91 | 96 | ||
92 | observableObject.notifier.next(param) | 97 | observableObject.notifier.next(param) |