File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -781,8 +781,7 @@ function subfieldConflicts(
781
781
}
782
782
783
783
/**
784
- * A way to keep track of pairs of things when the ordering of the pair does
785
- * not matter. We do this by maintaining a sort of double adjacency sets.
784
+ * A way to keep track of pairs of things when the ordering of the pair does not matter.
786
785
*/
787
786
class PairSet {
788
787
_data : Map < string , Map < string , boolean > > ;
@@ -798,13 +797,11 @@ class PairSet {
798
797
if ( result === undefined ) {
799
798
return false ;
800
799
}
801
- // areMutuallyExclusive being false is a superset of being true,
802
- // hence if we want to know if this PairSet "has" these two with no
803
- // exclusivity, we have to ensure it was added as such.
804
- if ( areMutuallyExclusive === false ) {
805
- return result === false ;
806
- }
807
- return true ;
800
+
801
+ // areMutuallyExclusive being false is a superset of being true, hence if
802
+ // we want to know if this PairSet "has" these two with no exclusivity,
803
+ // we have to ensure it was added as such.
804
+ return areMutuallyExclusive ? true : areMutuallyExclusive === result ;
808
805
}
809
806
810
807
add ( a : string , b : string , areMutuallyExclusive : boolean ) : void {
You can’t perform that action at this time.
0 commit comments