Formatting

This commit is contained in:
squidfunk
2021-03-07 15:40:20 +01:00
parent f14a96020b
commit f9cfd87708
5 changed files with 35 additions and 35 deletions

View File

@@ -180,8 +180,8 @@ export function setupInstantLoading(
.pipe(
filter(ev => !ev.metaKey && !ev.ctrlKey),
switchMap(ev => {
// Check for `Element` rather than `HTMLElement` to also
// handle <svg> elements within <a> elements.
/* Handle HTML and SVG elements */
if (ev.target instanceof Element) {
const el = ev.target.closest("a")
if (el && !el.target && urls.includes(el.href)) {