Skip to content

Commit c69249c

Browse files
authored
Merge pull request #103 from svalabs/fix-active-event-selection
Set selected event only if active
2 parents 32d44eb + 70112fd commit c69249c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/home/home.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ export class HomeComponent implements OnInit {
6565
this.scheduledEvents = s;
6666
this.activeEvents = s.filter(se => !se.finished);
6767
this.finishedEvents = s.filter(se => se.finished);
68-
if(s.length > 0){
69-
this.selectedEvent = s[0];
68+
if(this.activeEvents.length > 0){
69+
this.selectedEvent = this.activeEvents[0];
7070
this.refresh();
7171
}
7272
}

0 commit comments

Comments
 (0)