15803: Add checks that user uuid (from getUserUuid) is defined
[arvados-workbench2.git] / src / store / search-bar / search-bar-tree-actions.ts
index 0d193fa21e2fd9ac6ee2c02d60ee3a997c3f1e29..c97d77b35c4ce2308c1f2698893c5ac5fab9733e 100644 (file)
@@ -41,9 +41,7 @@ export const getSearchBarTreeNodeAncestorsIds = (id: string) => (treePicker: Tre
 export const activateSearchBarTreeBranch = (id: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const userUuid = getUserUuid(getState());
-        if (!userUuid) {
-            return;
-        }
+        if (!userUuid) { return; }
         const ancestors = await services.ancestorsService.ancestors(id, userUuid);
 
         for (const ancestor of ancestors) {