diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-28 15:15:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-28 15:15:41 +0200 |
commit | 251ce26db364e1d7468b43ca917dee648a9ad133 (patch) | |
tree | 5fd69c802db60821f05d0604f1e58e8a794d8709 /client/src/app/shared | |
parent | 49602b3a26816cef97788b5d5708dfc41dec338f (diff) | |
download | PeerTube-251ce26db364e1d7468b43ca917dee648a9ad133.tar.gz PeerTube-251ce26db364e1d7468b43ca917dee648a9ad133.tar.zst PeerTube-251ce26db364e1d7468b43ca917dee648a9ad133.zip |
Fix error display in bulk service
Diffstat (limited to 'client/src/app/shared')
-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) |