diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index d4abada11ecb..147d917efc49 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -461,7 +461,7 @@ function Search({ // Show a skeleton whenever heavy work is deferred, even for live-data (to-do) searches, // so we never fall through to the empty-state check with stale zero-length data. const isDeferringHeavyWork = !isOffline && shouldDeferHeavySearchWork; - const isSearchLoadingWithNoResults = !!searchResults?.search.isLoading && Array.isArray(searchResults?.data) && searchResults?.data.length === 0; + const isSearchLoadingWithNoResults = !!searchResults?.search?.isLoading && Array.isArray(searchResults?.data) && searchResults?.data.length === 0; const hasUnresolvedErrors = hasErrors && searchRequestResponseStatusCode === null; const isWaitingForInitialData = !shouldUseLiveData && !isOffline && (!isDataLoaded || isSearchLoadingWithNoResults || hasUnresolvedErrors || isCardFeedsLoading); const shouldShowLoadingState = isDeferringHeavyWork || isWaitingForInitialData;