Clear timer value when timer stopped

This commit is contained in:
David Rowe 2017-05-12 14:13:32 +12:00
parent d7a4396daa
commit 26672b475f

View file

@ -85,8 +85,9 @@
log("Create recording entity for " + filename); log("Create recording entity for " + filename);
if (updateTimestampTimer !== null) { if (updateTimestampTimer !== null) { // Just in case.
Script.clearInterval(updateTimestampTimer); // Just in case. Script.clearInterval(updateTimestampTimer);
updateTimestampTimer = null;
} }
searchState = SEARCH_IDLE; searchState = SEARCH_IDLE;
@ -234,6 +235,7 @@
} }
if (updateTimestampTimer !== null) { // Just in case. if (updateTimestampTimer !== null) { // Just in case.
Script.clearInterval(updateTimestampTimer); Script.clearInterval(updateTimestampTimer);
updateTimestampTimer = null;
} }
} }