From 81afd58583a8fef8aceaaca75b1b3f66f44bf9e5 Mon Sep 17 00:00:00 2001 From: codediodeio Date: Sat, 5 Aug 2023 08:36:30 -0700 Subject: [PATCH] fix: input focus --- app/components/search/algolia-search.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/search/algolia-search.svelte b/app/components/search/algolia-search.svelte index b76130920..b6271be9e 100644 --- a/app/components/search/algolia-search.svelte +++ b/app/components/search/algolia-search.svelte @@ -16,7 +16,7 @@ let hits = []; let activeHit = 0; onMount(() => { - inputTag.focus(); + inputTag?.focus(); return () => { window.removeEventListener('keydown', handleSpecialKeys); };