mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-23 23:21:00 +01:00
Improved semantics when returning from switchMap
This commit is contained in:
parent
eea6d1eec4
commit
1d1cf476c8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -214,7 +214,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.130b2e88.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.897f3768.min.js' | url }}"></script>
|
||||
{% for path in config["extra_javascript"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -16,5 +16,5 @@
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script src="{{ 'overrides/assets/javascripts/bundle.2e51be42.min.js' | url }}"></script>
|
||||
<script src="{{ 'overrides/assets/javascripts/bundle.a375bc7d.min.js' | url }}"></script>
|
||||
{% endblock %}
|
||||
|
@ -260,7 +260,7 @@ export function setupInstantLoading(
|
||||
.pipe(
|
||||
skip(1),
|
||||
map(() => getComponentElement("container")),
|
||||
switchMap(el => of(...getElements("script", el))),
|
||||
switchMap(el => getElements("script", el)),
|
||||
concatMap(el => {
|
||||
const script = h("script")
|
||||
if (el.src) {
|
||||
|
@ -25,7 +25,6 @@ import {
|
||||
fromEvent,
|
||||
mapTo,
|
||||
mergeMap,
|
||||
of,
|
||||
switchMap,
|
||||
takeWhile,
|
||||
tap,
|
||||
@ -63,9 +62,9 @@ export function patchIndeterminate(
|
||||
): void {
|
||||
document$
|
||||
.pipe(
|
||||
switchMap(() => of(...getElements<HTMLInputElement>(
|
||||
switchMap(() => getElements<HTMLInputElement>(
|
||||
"[data-md-state=indeterminate]"
|
||||
))),
|
||||
)),
|
||||
tap(el => {
|
||||
el.indeterminate = true
|
||||
el.checked = false
|
||||
|
@ -26,7 +26,6 @@ import {
|
||||
fromEvent,
|
||||
mapTo,
|
||||
mergeMap,
|
||||
of,
|
||||
switchMap,
|
||||
tap
|
||||
} from "rxjs"
|
||||
@ -77,7 +76,7 @@ export function patchScrollfix(
|
||||
): void {
|
||||
document$
|
||||
.pipe(
|
||||
switchMap(() => of(...getElements("[data-md-scrollfix]"))),
|
||||
switchMap(() => getElements("[data-md-scrollfix]")),
|
||||
tap(el => el.removeAttribute("data-md-scrollfix")),
|
||||
filter(isAppleDevice),
|
||||
mergeMap(el => fromEvent(el, "touchstart")
|
||||
|
@ -218,7 +218,7 @@ export function mountIconSearchResult(
|
||||
.pipe(
|
||||
bufferCount(10),
|
||||
zipWith(boundary$),
|
||||
switchMap(([chunk]) => of(...chunk))
|
||||
switchMap(([chunk]) => chunk)
|
||||
)
|
||||
)),
|
||||
withLatestFrom(query$)
|
||||
|
@ -108,7 +108,7 @@ export function resolve(
|
||||
return from(glob(pattern, options))
|
||||
.pipe(
|
||||
catchError(() => EMPTY),
|
||||
switchMap(files => from(files)),
|
||||
switchMap(files => files),
|
||||
options?.watch
|
||||
? mergeWith(watch(pattern, options))
|
||||
: identity
|
||||
|
Loading…
Reference in New Issue
Block a user