Fixed duplication of search worker when subscribing to observable

This commit is contained in:
squidfunk
2020-06-20 12:21:34 +02:00
parent 6992b3cd73
commit f32778cda2
5 changed files with 8 additions and 8 deletions

View File

@@ -292,14 +292,14 @@ export function initialize(config: unknown) {
return useComponent("search")
.pipe(
mountSearch(worker, { query$, reset$, result$ }),
shareReplay(1)
)
}),
catchError(() => {
useComponent("search")
.subscribe(el => el.hidden = true) // TODO: Hack
return NEVER
})
}),
shareReplay(1)
)
/* ----------------------------------------------------------------------- */