Fix determination of current event

This commit is contained in:
Petko Bordjukov 2014-07-12 13:26:12 +03:00
parent 053876bb39
commit 3e53933911
1 changed files with 1 additions and 1 deletions

View File

@ -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;