From d5fd74315d233aeb03543958e408a5a264db43e9 Mon Sep 17 00:00:00 2001 From: garee76 Date: Tue, 31 Jan 2023 17:49:36 +0100 Subject: [PATCH] fixed safari requestIdleCallback Safari doesn't support `requestIdleCallback`. But there's an error if we leave out `window` in `window.requestIdleCallback`. --- src/client/theme-default/components/VPNavBarSearch.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/theme-default/components/VPNavBarSearch.vue b/src/client/theme-default/components/VPNavBarSearch.vue index ae8d330435cb..52b9629b2fc2 100644 --- a/src/client/theme-default/components/VPNavBarSearch.vue +++ b/src/client/theme-default/components/VPNavBarSearch.vue @@ -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