Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
p3rcypj committed Jun 3, 2024
1 parent addc479 commit 16abd9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/domain/entities/LandingNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,20 @@ function updateLandingNodes(nodes: LandingNode[], permissions: LandingPagePermis
return updatedNodes;
}

function applyFavicon(children: LandingNode[], favicon: string): LandingNode[] {
function spreadFavicon(children: LandingNode[], favicon: string): LandingNode[] {
return _.map(children, child => {
return {
...child,
favicon: favicon,
children: applyFavicon(child.children, favicon),
children: spreadFavicon(child.children, favicon),
};
});
}

export function updateLandings(nodes: LandingNode[], permissions: LandingPagePermission[], user: User): LandingNode[] {
const landings = updateLandingNodes(nodes, permissions, user);

return landings.map(landing => ({ ...landing, children: applyFavicon(landing.children, landing.favicon) }));
return landings.map(landing => ({ ...landing, children: spreadFavicon(landing.children, landing.favicon) }));
}

// Return
Expand Down

0 comments on commit 16abd9a

Please sign in to comment.