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>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% 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 %}
|
{% for script in config.extra_javascript %}
|
||||||
{{ script | script_tag }}
|
{{ script | script_tag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -90,10 +90,11 @@ export function watchPalette(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Emit changes in color palette */
|
/* Emit changes in color palette */
|
||||||
|
const index = Math.max(0, Math.min(current.index, inputs.length - 1))
|
||||||
return of(...inputs)
|
return of(...inputs)
|
||||||
.pipe(
|
.pipe(
|
||||||
mergeMap(input => fromEvent(input, "change").pipe(map(() => input))),
|
mergeMap(input => fromEvent(input, "change").pipe(map(() => input))),
|
||||||
startWith(inputs[Math.max(0, current.index)]),
|
startWith(inputs[index]),
|
||||||
map(input => ({
|
map(input => ({
|
||||||
index: inputs.indexOf(input),
|
index: inputs.indexOf(input),
|
||||||
color: {
|
color: {
|
||||||
|
Loading…
Reference in New Issue
Block a user