1
0
Fork 0

Fix error display in bulk service

This commit is contained in:
Chocobozzz 2022-09-28 15:15:41 +02:00
parent 49602b3a26
commit 251ce26db3
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 10 additions and 5 deletions

View File

@ -80,13 +80,18 @@ export class FindInBulkService {
map(result => result.response.data),
map(data => data.find(finder))
)
.subscribe(result => {
if (!result) {
obs.error(new Error($localize`Element ${param} not found`))
} else {
.subscribe({
next: result => {
if (!result) {
obs.error(new Error($localize`Element ${param} not found`))
return
}
obs.next(result)
obs.complete()
}
},
error: err => obs.error(err)
})
observableObject.notifier.next(param)