mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed duplication of search worker when subscribing to observable
This commit is contained in:
parent
6992b3cd73
commit
f32778cda2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.5ad6861d.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.5ad6861d.min.js.map",
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.565e6875.min.js",
|
||||
"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.map": "assets/javascripts/vendor.de50e36d.min.js.map",
|
||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.7a2ea5ba.min.js",
|
||||
|
@ -183,7 +183,7 @@
|
||||
</div>
|
||||
{% block scripts %}
|
||||
<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 = {} -%}
|
||||
{%- for key in [
|
||||
"clipboard.copy",
|
||||
|
@ -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)
|
||||
)
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user