mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 14:54:57 -05:00
Callbacks: Disabling a callback should prevent firing
Thanks to @TheDistantSea for the report!
Fixes gh-1790
Closes gh-1643
(cherry picked from commit bc1cb122db)
This commit is contained in:
@@ -151,8 +151,10 @@ jQuery.Callbacks = function( options ) {
|
||||
},
|
||||
// Remove all callbacks from the list
|
||||
empty: function() {
|
||||
list = [];
|
||||
firingLength = 0;
|
||||
if ( list ) {
|
||||
list = [];
|
||||
firingLength = 0;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
// Have the list do nothing anymore
|
||||
|
||||
Reference in New Issue
Block a user