From 3cda30b9a4c49f4ffdc524f0e125803265b4ebec Mon Sep 17 00:00:00 2001 From: Sherange Fonseka Date: Wed, 31 Jan 2024 19:04:08 +0530 Subject: [PATCH] fix navigation on enter (#157) --- packages/web-shared/components/Searchbar/Autocomplete.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/web-shared/components/Searchbar/Autocomplete.js b/packages/web-shared/components/Searchbar/Autocomplete.js index 03464d5e..9bb34f15 100644 --- a/packages/web-shared/components/Searchbar/Autocomplete.js +++ b/packages/web-shared/components/Searchbar/Autocomplete.js @@ -159,7 +159,11 @@ export default function Autocomplete({ }); }, getItemUrl({ item }) { - return `/?query=${item.name}`; + if (item?.name) { + return `/?query=${item.name}`; + } else { + return item.url; + } }, }, {