mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-04 11:35:17 -04:00
Fixed search for use_directory_urls: false
This commit is contained in:
@@ -28,11 +28,10 @@ import {
|
||||
pluck,
|
||||
share,
|
||||
skip,
|
||||
startWith,
|
||||
switchMap
|
||||
} from "rxjs/operators"
|
||||
|
||||
import { getLocation, setLocation } from "../../location"
|
||||
import { setLocation } from "../../location"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Helper types
|
||||
@@ -52,7 +51,7 @@ interface WatchOptions {
|
||||
/**
|
||||
* Watch document switch
|
||||
*
|
||||
* This function returns an observables that fetches a document if the provided // TODO: update docs
|
||||
* This function returns an observables that fetches a document if the provided
|
||||
* location observable emits a new value (i.e. URL). If the emitted URL points
|
||||
* to the same page, the request is effectively ignored (i.e. when only the
|
||||
* fragment identifier changes).
|
||||
@@ -68,7 +67,6 @@ export function watchDocumentSwitch(
|
||||
): Observable<Document> {
|
||||
return location$
|
||||
.pipe(
|
||||
startWith(getLocation()),
|
||||
distinctUntilKeyChanged("pathname"),
|
||||
skip(1),
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import { Subject } from "rxjs"
|
||||
import { BehaviorSubject } from "rxjs"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Functions
|
||||
@@ -56,6 +56,6 @@ export function setLocation(url: URL): void {
|
||||
*
|
||||
* @return Location subject
|
||||
*/
|
||||
export function watchLocation(): Subject<URL> {
|
||||
return new Subject<URL>()
|
||||
export function watchLocation(): BehaviorSubject<URL> {
|
||||
return new BehaviorSubject<URL>(getLocation())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user