mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-30 18:24:35 +01:00
Fixed search index being loaded when search is disabled
This commit is contained in:
parent
f05c34e30d
commit
5a510cedb3
File diff suppressed because one or more lines are too long
7
material/assets/javascripts/bundle.9b151c6a.min.js.map
Normal file
7
material/assets/javascripts/bundle.9b151c6a.min.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -217,7 +217,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.da29d79a.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.9b151c6a.min.js' | url }}"></script>
|
||||
{% for path in config["extra_javascript"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
import "focus-visible"
|
||||
import { Subject, defer, merge } from "rxjs"
|
||||
import { NEVER, Subject, defer, merge } from "rxjs"
|
||||
import {
|
||||
delay,
|
||||
filter,
|
||||
@ -91,11 +91,13 @@ const tablet$ = watchMedia("(min-width: 960px)")
|
||||
const screen$ = watchMedia("(min-width: 1220px)")
|
||||
const print$ = watchPrint()
|
||||
|
||||
/* Retrieve search index */
|
||||
/* Retrieve search index, if search is enabled */
|
||||
const config = configuration()
|
||||
const index$ = __search?.index || requestJSON<SearchIndex>(
|
||||
const index$ = document.forms.namedItem("search")
|
||||
? __search?.index || requestJSON<SearchIndex>(
|
||||
`${config.base}/search/search_index.json`
|
||||
)
|
||||
)
|
||||
: NEVER
|
||||
|
||||
/* Set up Clipboard.js integration */
|
||||
const alert$ = new Subject<string>()
|
||||
|
Loading…
Reference in New Issue
Block a user