diff --git a/app/client/src/components/editorComponents/GlobalSearch/index.tsx b/app/client/src/components/editorComponents/GlobalSearch/index.tsx index 241219fe0849..30440c34af6e 100644 --- a/app/client/src/components/editorComponents/GlobalSearch/index.tsx +++ b/app/client/src/components/editorComponents/GlobalSearch/index.tsx @@ -441,7 +441,11 @@ function GlobalSearch() { const handleItemLinkClick = (itemArg?: SearchItem, source?: string) => { const item = itemArg || activeItem; - const type = getItemType(item) as SEARCH_ITEM_TYPES; + const type = getItemType(item); + + // When there is no active item(or no search results) do nothing + // on pressing enter + if (!searchResults.length) return; AnalyticsUtil.logEvent("NAVIGATE_TO_ENTITY_FROM_OMNIBAR", { type,