Skip to content

Commit 383e8c5

Browse files
committed
refactor: - Make the non-removeScheduledDateOnRecurrence behaviour explicit
1 parent 58d0904 commit 383e8c5

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Task/Occurrence.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ export class Occurrence {
6767
}
6868

6969
private getDatePriorityOrder(): (Moment | null)[] {
70-
const datesInPriorityOrder: (Moment | null)[] = [];
71-
72-
datesInPriorityOrder.push(this.dueDate);
73-
7470
const { removeScheduledDateOnRecurrence } = getSettings();
7571
if (removeScheduledDateOnRecurrence) {
7672
// If the `removeScheduledDateOnRecurrence` setting is enabled, it does
@@ -79,10 +75,8 @@ export class Occurrence {
7975
// this setting is enabled, we favour start date over scheduled date:
8076
return [this.dueDate, this.startDate, this.scheduledDate];
8177
} else {
82-
datesInPriorityOrder.push(this.scheduledDate);
83-
datesInPriorityOrder.push(this.startDate);
78+
return [this.dueDate, this.scheduledDate, this.startDate];
8479
}
85-
return datesInPriorityOrder;
8680
}
8781

8882
public isIdenticalTo(other: Occurrence): boolean {

0 commit comments

Comments
 (0)