mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-03 03:10:07 -04:00
Fixed localsearch integration
This commit is contained in:
@@ -130,13 +130,13 @@ export function createElement<T extends keyof HTMLElementTagNameMap>(
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace an element with another element
|
||||
* Replace an element with the given list of nodes
|
||||
*
|
||||
* @param source - Source element
|
||||
* @param target - Target element
|
||||
* @param el - Element
|
||||
* @param nodes - Replacement nodes
|
||||
*/
|
||||
export function replaceElement(
|
||||
source: HTMLElement, target: Node
|
||||
el: HTMLElement, ...nodes: Node[]
|
||||
): void {
|
||||
source.replaceWith(target)
|
||||
el.replaceWith(...nodes)
|
||||
}
|
||||
|
||||
@@ -84,10 +84,6 @@ interface MountOptions {
|
||||
export function mountSearch(
|
||||
el: HTMLElement, { index$, keyboard$ }: MountOptions
|
||||
): Observable<Component<Search>> {
|
||||
if (location.protocol === "file:")
|
||||
return NEVER
|
||||
|
||||
/* Set up search worker */
|
||||
const config = configuration()
|
||||
const worker = setupSearchWorker(config.search, index$)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user