Set timerId to true instead of a number so that intervals set to 1 are not accidentally cleared when stopped. Fixes #9678.

- Adding a working test case would not be possible in this case, but all tests pass.
This commit is contained in:
timmywil 2011-06-28 11:46:03 -04:00
parent 96501d38a9
commit ab1504f14f

2
src/effects.js vendored
View file

@ -411,7 +411,7 @@ jQuery.fx.prototype = {
if ( t() && jQuery.timers.push(t) && !timerId ) { if ( t() && jQuery.timers.push(t) && !timerId ) {
// Use requestAnimationFrame instead of setInterval if available // Use requestAnimationFrame instead of setInterval if available
if ( requestAnimationFrame ) { if ( requestAnimationFrame ) {
timerId = 1; timerId = true;
raf = function() { raf = function() {
// When timerId gets set to null at any point, this stops // When timerId gets set to null at any point, this stops
if ( timerId ) { if ( timerId ) {