mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed change of palette configuration breaking site
This commit is contained in:
parent
ab5ccbe6b8
commit
d87c20fafc
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -249,7 +249,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.8b606f3b.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.7389ff0e.min.js' | url }}"></script>
|
||||
{% for script in config.extra_javascript %}
|
||||
{{ script | script_tag }}
|
||||
{% endfor %}
|
||||
|
@ -90,10 +90,11 @@ export function watchPalette(
|
||||
}
|
||||
|
||||
/* Emit changes in color palette */
|
||||
const index = Math.max(0, Math.min(current.index, inputs.length - 1))
|
||||
return of(...inputs)
|
||||
.pipe(
|
||||
mergeMap(input => fromEvent(input, "change").pipe(map(() => input))),
|
||||
startWith(inputs[Math.max(0, current.index)]),
|
||||
startWith(inputs[index]),
|
||||
map(input => ({
|
||||
index: inputs.indexOf(input),
|
||||
color: {
|
||||
|
Loading…
Reference in New Issue
Block a user