mirror of
https://github.com/jquery/jquery.git
synced 2026-02-02 09:35:09 -05:00
Callbacks: Disabling a callback should prevent firing
Thanks to @TheDistantSea for the report! Fixes gh-1790 Closes gh-1643
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