mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-23 06:13:38 -04:00
Refactored project structure
This commit is contained in:
@@ -29,7 +29,7 @@ import {
|
||||
startWith
|
||||
} from "rxjs"
|
||||
|
||||
import { getElement } from "~/browser"
|
||||
import { getOptionalElement } from "~/browser"
|
||||
import { h } from "~/utilities"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
@@ -86,7 +86,7 @@ export function watchLocationHash(): Observable<string> {
|
||||
export function watchLocationTarget(): Observable<HTMLElement> {
|
||||
return watchLocationHash()
|
||||
.pipe(
|
||||
map(id => getElement(`[id="${id}"]`)!),
|
||||
map(id => getOptionalElement(`[id="${id}"]`)!),
|
||||
filter(el => typeof el !== "undefined")
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user