diff --git a/src/Raven.Studio/typescript/components/shell/studioSearchWithDatabaseSelector/studioSearch/hooks/useStudioSearchAsyncRegister.ts b/src/Raven.Studio/typescript/components/shell/studioSearchWithDatabaseSelector/studioSearch/hooks/useStudioSearchAsyncRegister.ts index fe0256169b8a..a08ff8104e14 100644 --- a/src/Raven.Studio/typescript/components/shell/studioSearchWithDatabaseSelector/studioSearch/hooks/useStudioSearchAsyncRegister.ts +++ b/src/Raven.Studio/typescript/components/shell/studioSearchWithDatabaseSelector/studioSearch/hooks/useStudioSearchAsyncRegister.ts @@ -210,7 +210,7 @@ export function useStudioSearchAsyncRegister(props: UseStudioSearchAsyncRegister { onSuccess: (results) => { // When previous and current results are empty do nothing - if (results.length === 0 && asyncGetDocuments.result.length === 0) { + if (results?.length === 0 && asyncGetDocuments.result?.length === 0) { return; }