Skip to content

Commit d5d0864

Browse files
committed
docs: fix usage
1 parent 7f450f1 commit d5d0864

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

docs/pages/index.vue

+8-9
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@ useSeoMeta({
1414
ogDescription: page.value.description,
1515
ogImage: joinURL(url, '/social-card.png')
1616
})
17-
18-
const videoLink = page.value.hero.links.find(link => link.id === 'intro-video')
19-
videoLink.click = (e) => {
20-
if (e.ctrlKey || e.metaKey) {
21-
return
22-
}
23-
e?.preventDefault()
24-
videoModalOpen.value = true
25-
}
17+
const videoLink = page.value?.hero?.links?.find(link => link.id === 'intro-video') || {}
2618
2719
onMounted(() => {
2820
mediumZoom('[data-zoom-src]', {
2921
margin: 5
3022
})
23+
videoLink.click = (e) => {
24+
if (e.ctrlKey || e.metaKey) {
25+
return
26+
}
27+
e?.preventDefault()
28+
videoModalOpen.value = true
29+
}
3130
})
3231
</script>
3332

0 commit comments

Comments
 (0)