File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -53,24 +53,24 @@ export class Occurrence {
5353 * @private
5454 */
5555 private getReferenceDate ( ) : Moment | null {
56- const dates : ( Moment | null ) [ ] = [ ] ;
56+ const datesInPriorityOrder : ( Moment | null ) [ ] = [ ] ;
5757
58- dates . push ( this . dueDate ) ;
58+ datesInPriorityOrder . push ( this . dueDate ) ;
5959
6060 const { removeScheduledDateOnRecurrence } = getSettings ( ) ;
6161 if ( removeScheduledDateOnRecurrence ) {
6262 // If the `removeScheduledDateOnRecurrence` setting is enabled, it does
6363 // not make sense to pick the scheduled date over the start date because
6464 // the scheduled date will be deleted in the newly created task. So if
6565 // this setting is enabled, we favour start date over scheduled date:
66- dates . push ( this . startDate ) ;
67- dates . push ( this . scheduledDate ) ;
66+ datesInPriorityOrder . push ( this . startDate ) ;
67+ datesInPriorityOrder . push ( this . scheduledDate ) ;
6868 } else {
69- dates . push ( this . scheduledDate ) ;
70- dates . push ( this . startDate ) ;
69+ datesInPriorityOrder . push ( this . scheduledDate ) ;
70+ datesInPriorityOrder . push ( this . startDate ) ;
7171 }
7272
73- for ( const date of dates ) {
73+ for ( const date of datesInPriorityOrder ) {
7474 if ( date ) {
7575 return window . moment ( date ) ;
7676 }
You can’t perform that action at this time.
0 commit comments