mirror of
https://github.com/jquery/jquery.git
synced 2024-10-05 11:34:18 +00:00
Core: remove precautionary variable readyFiring
Close gh-3284
This commit is contained in:
parent
37f1da6b91
commit
fcb8a1b3eb
@ -6,7 +6,6 @@ define( [
|
||||
"use strict";
|
||||
|
||||
var readyCallbacks = [],
|
||||
readyFiring = false,
|
||||
whenReady = function( fn ) {
|
||||
readyCallbacks.push( fn );
|
||||
},
|
||||
@ -60,17 +59,12 @@ jQuery.extend( {
|
||||
whenReady = function( fn ) {
|
||||
readyCallbacks.push( fn );
|
||||
|
||||
if ( !readyFiring ) {
|
||||
readyFiring = true;
|
||||
|
||||
while ( readyCallbacks.length ) {
|
||||
fn = readyCallbacks.shift();
|
||||
if ( jQuery.isFunction( fn ) ) {
|
||||
executeReady( fn );
|
||||
}
|
||||
}
|
||||
readyFiring = false;
|
||||
}
|
||||
};
|
||||
|
||||
whenReady();
|
||||
|
Loading…
Reference in New Issue
Block a user