Refactored project structure

This commit is contained in:
squidfunk
2021-11-14 16:09:09 +01:00
parent ad1b964aaa
commit 88ba609ee1
52 changed files with 721 additions and 459 deletions

View File

@@ -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")
)
}