Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Anis SMAIL committed Feb 6, 2025
1 parent a136c5a commit 6d636c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/src/components/App/Studies/StudyTree/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ export function mergeDeepRightStudyTree(left: StudyTreeNode, right: StudyTreeNod
* @returns list of tuples where the first element is from the left list and the second element is from the right list.
*/
export function innerJoin(
left: Array<StudyTreeNode>,
right: Array<StudyTreeNode>,
left: StudyTreeNode[],
right: StudyTreeNode[],
): Array<[StudyTreeNode, StudyTreeNode]> {
return left.reduce<[StudyTreeNode, StudyTreeNode][]>((acc, leftNode) => {
return left.reduce<Array<[StudyTreeNode, StudyTreeNode]>>((acc, leftNode) => {
const matchedRightNode = right.find((rightNode) => rightNode.name === leftNode.name);
if (matchedRightNode) {
acc.push([{ ...leftNode }, { ...matchedRightNode }]);
Expand Down

0 comments on commit 6d636c4

Please sign in to comment.