We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
preconnect()
1 parent 616fe5b commit 48c9b11Copy full SHA for 48c9b11
src/client/theme-default/components/VPNavBarSearch.vue
@@ -34,22 +34,20 @@ const preconnect = () => {
34
35
const rIC = window.requestIdleCallback || setTimeout
36
rIC(() => {
37
- if (!theme.value.algolia || document.head.querySelector(`#${id}`)) return
38
-
39
const preconnect = document.createElement('link')
40
preconnect.id = id
41
preconnect.rel = 'preconnect'
42
- preconnect.href = `https://${theme.value.algolia.appId}-dsn.algolia.net`
+ preconnect.href = `https://${theme.value.algolia!.appId}-dsn.algolia.net`
43
preconnect.crossOrigin = ''
44
document.head.appendChild(preconnect)
45
})
46
- }
+}
47
48
onMounted(() => {
49
if (!theme.value.algolia) {
50
return
51
}
52
+
53
54
55
// meta key detect (same logic as in @docsearch/js)
0 commit comments