Skip to content

Commit

Permalink
Stop any already running updateTimer interval before initializing a n…
Browse files Browse the repository at this point in the history
…ew interval.
  • Loading branch information
alexthewilde committed Mar 23, 2016
1 parent d8f109d commit 7671167
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ angular.module("info.vietnamcode.nampnq.videogular.plugins.youtube", [])
}

function startUpdateTimer(interval) {
if (updateTimer) {
stopUpdateTimer();
}
updateTimer = setInterval(updateTime, interval);
}

Expand Down

0 comments on commit 7671167

Please sign in to comment.