File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export class Grouper {
37
37
38
38
/**
39
39
* Whether the headings for this group should be reversed.
40
+ * TODO now reverse used only in TaskGroups.toString(), shall be removed.
40
41
*/
41
42
public readonly reverse : boolean ;
42
43
@@ -46,6 +47,10 @@ export class Grouper {
46
47
this . property = property ;
47
48
this . grouper = grouper ;
48
49
this . reverse = reverse ;
49
- this . comparator = comparator ;
50
+ this . comparator = ( a : Task , b : Task ) => {
51
+ const result = comparator ( a , b ) ;
52
+
53
+ return reverse ? - result : result ;
54
+ } ;
50
55
}
51
56
}
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ export class TaskGroups {
110
110
const grouper = this . _groupers [ i ] ;
111
111
const result = grouper . comparator ( group1 . tasks [ 0 ] , group2 . tasks [ 0 ] ) ;
112
112
if ( result !== 0 ) {
113
- return grouper . reverse ? - result : result ;
113
+ return result ;
114
114
}
115
115
}
116
116
// identical if we reach here
You can’t perform that action at this time.
0 commit comments