Skip to content

Commit

Permalink
use cached commons in the breadcrumbs commons fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
andreymikhadyuk committed Nov 29, 2023
1 parent 30edd7d commit 07ae593
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import { MultipleSpacesLayoutState, ProjectsStateItem } from "../types";
const fetchProjectsInfoByActiveCommonId = async (
commonId: string,
): Promise<ProjectsStateItem[]> => {
const activeCommon = await CommonService.getCommonById(commonId);
const activeCommon = await CommonService.getCommonById(commonId, true);

if (!activeCommon) {
return [];
}

const commons = await CommonService.getAllParentCommonsForCommon(
activeCommon,
true,
);

return [...commons, activeCommon].map((common) => ({
Expand Down

0 comments on commit 07ae593

Please sign in to comment.