Skip to content

Commit 00d94e9

Browse files
authored
chore: simplify code
1 parent 6b98113 commit 00d94e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/theme-default/components/VPDocOutlineItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ defineProps<{
77
}>()
88
99
function onClick({ target: el }: Event) {
10-
const id = '#' + (el as HTMLAnchorElement).href!.split('#')[1]
11-
const heading = document.getElementById(decodeURIComponent(id).slice(1))
10+
const id = (el as HTMLAnchorElement).href!.split('#')[1]
11+
const heading = document.getElementById(decodeURIComponent(id))
1212
heading?.focus()
1313
}
1414
</script>

0 commit comments

Comments
 (0)