Fix determination of current event
This commit is contained in:
parent
053876bb39
commit
3e53933911
|
@ -21,7 +21,7 @@ function Schedule() {
|
|||
this.currentEvent = function() {
|
||||
var latestEvent = _.last(this.pastEvents());
|
||||
var nextEvent = this.nextEvent();
|
||||
if (typeof nextEvent != 'undefined' && nextEvent.startTime.subtract('10', 'minutes').isAfter(moment())) {
|
||||
if (typeof nextEvent != 'undefined' && (latestEvent.displayNext || moment(nextEvent.startTime).subtract('minutes', 10).isAfter(moment()))) {
|
||||
return latestEvent;
|
||||
} else {
|
||||
return undefined;
|
||||
|
|
Loading…
Reference in New Issue