diff --git a/components/AlgoliaSearch.tsx b/components/AlgoliaSearch.tsx index a7d3604fafb7..06d37889c473 100644 --- a/components/AlgoliaSearch.tsx +++ b/components/AlgoliaSearch.tsx @@ -312,6 +312,8 @@ export function SearchButton({ children, indexName = INDEX_NAME, ...props }: ISe useEffect(() => { if (typeof children === 'function') { setChildren(children({ actionKey })); + } else { + setChildren(children); } }, []);