parseInt prevEventId and nextEventID to be sure that our tests for != 0 work. Also don't go to previous event if prevEventId ==0.Maybe Fixes #3390

This commit is contained in:
Isaac Connor 2021-12-14 14:22:11 -05:00
parent 61fe35a32a
commit e8edeab641
1 changed files with 6 additions and 4 deletions

View File

@ -446,8 +446,10 @@ function streamFastRev(action) {
function streamPrev(action) {
if (action) {
$j(".vjsMessage").remove();
location.replace(thisUrl + '?view=event&eid=' + prevEventId + filterQuery + sortQuery);
return;
if (prevEventId != 0) {
location.replace(thisUrl + '?view=event&eid=' + prevEventId + filterQuery + sortQuery);
return;
}
/* Ideally I'd like to get back to this style
if ( vid && PrevEventDefVideoPath.indexOf("view_video") > 0 ) {
@ -619,8 +621,8 @@ function getNearEventsResponse(respObj, respText) {
if (checkStreamForErrors('getNearEventsResponse', respObj)) {
return;
}
prevEventId = respObj.nearevents.PrevEventId;
nextEventId = respObj.nearevents.NextEventId;
prevEventId = parseInt(respObj.nearevents.PrevEventId);
nextEventId = parseInt(respObj.nearevents.NextEventId);
prevEventStartTime = Date.parse(respObj.nearevents.PrevEventStartTime);
nextEventStartTime = Date.parse(respObj.nearevents.NextEventStartTime);
PrevEventDefVideoPath = respObj.nearevents.PrevEventDefVideoPath;