Skip to content

Commit

Permalink
🚑 Bug with triplets
Browse files Browse the repository at this point in the history
- tripelts were being counted 3 times
  • Loading branch information
rodigu committed Apr 6, 2022
1 parent 6ff495c commit 4964f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ export class Network {
*/
private isSameCycle(arr1: base_id[], arr2: base_id[]): boolean {
if (arr1.length !== arr2.length) return false;
return arr1.every((element) => arr2.includes(element));
return arr1.every((element, index) => arr2[index] === element);
}

/**
Expand Down

0 comments on commit 4964f15

Please sign in to comment.