Add another clearInterval to prevent looping during window.location

This commit is contained in:
Isaac Connor 2022-02-25 15:54:56 -05:00
parent 9b0714d20d
commit 6fc5803e16
1 changed files with 1 additions and 0 deletions

View File

@ -965,6 +965,7 @@ var secondsToCycle = 0;
function nextCycleView() { function nextCycleView() {
secondsToCycle --; secondsToCycle --;
if (secondsToCycle<=0) { if (secondsToCycle<=0) {
clearInterval(intervalId);
secondsToCycle = 0; secondsToCycle = 0;
window.location.replace('?view=watch&mid='+nextMid+'&mode='+mode+'&cycle=true'); window.location.replace('?view=watch&mid='+nextMid+'&mode='+mode+'&cycle=true');
} }