fix: safari use `window.requestIdleCallback` (#1871)

pull/1873/head
garee76 2 years ago committed by GitHub
parent 893bfd290e
commit 507b193ef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -82,7 +82,7 @@ function poll() {
onMounted(() => {
const id = 'VPAlgoliaPreconnect'
const rIC = requestIdleCallback || setTimeout
const rIC = window.requestIdleCallback || setTimeout
rIC(() => {
if (!theme.value.algolia || document.head.querySelector(`#${id}`)) return

Loading…
Cancel
Save