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

@ -1,6 +1,6 @@
{ {
"assets/javascripts/bundle.js": "assets/javascripts/bundle.5ad6861d.min.js", "assets/javascripts/bundle.js": "assets/javascripts/bundle.565e6875.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.5ad6861d.min.js.map", "assets/javascripts/bundle.js.map": "assets/javascripts/bundle.565e6875.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.de50e36d.min.js", "assets/javascripts/vendor.js": "assets/javascripts/vendor.de50e36d.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.de50e36d.min.js.map", "assets/javascripts/vendor.js.map": "assets/javascripts/vendor.de50e36d.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.7a2ea5ba.min.js", "assets/javascripts/worker/search.js": "assets/javascripts/worker/search.7a2ea5ba.min.js",

View File

@ -183,7 +183,7 @@
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ 'assets/javascripts/vendor.de50e36d.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/vendor.de50e36d.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.5ad6861d.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/bundle.565e6875.min.js' | url }}"></script>
{%- set translations = {} -%} {%- set translations = {} -%}
{%- for key in [ {%- for key in [
"clipboard.copy", "clipboard.copy",

View File

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