Permalink
Browse files

Updated Ticker with fix for multiple timeouts.

Signed-off-by: Grant Skinner <info@gskinner.com>
  • Loading branch information...
1 parent b1e3da3 commit e5b57f681498a8f2e9b51adc2cf1f47e4c75f604 @gskinner gskinner committed Nov 11, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Ticker.js
View
@@ -243,7 +243,7 @@ var Ticker = function() {
Ticker.setInterval = function(interval) {
Ticker._lastTime = Ticker._getTime();
Ticker._interval = interval;
- if (Ticker.timeoutID) { clearTimeout(Ticker.timeoutID); }
+ if (Ticker.timeoutID != null) { clearTimeout(Ticker.timeoutID); }
if (Ticker.useRAF) {
var f = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame || window.msRequestAnimationFrame;

0 comments on commit e5b57f6

Please sign in to comment.