diff options
author | Steve Mao <maochenyan@gmail.com> | 2016-08-21 10:43:22 +1000 |
---|---|---|
committer | Timmy Willison <4timmywil@gmail.com> | 2016-09-19 13:08:39 -0400 |
commit | fcb8a1b3ebf53007637c12c376e3101681f57c02 (patch) | |
tree | 78d0a215e97b61de01ec264843d24f2945b1e022 | |
parent | 37f1da6b91a86ef3f54f4cf16dd87f5afd33c835 (diff) | |
download | jquery-fcb8a1b3ebf53007637c12c376e3101681f57c02.tar.gz jquery-fcb8a1b3ebf53007637c12c376e3101681f57c02.zip |
Core: remove precautionary variable `readyFiring`
Close gh-3284
-rw-r--r-- | src/core/ready-no-deferred.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/ready-no-deferred.js b/src/core/ready-no-deferred.js index 5baed2e5c..02d601401 100644 --- a/src/core/ready-no-deferred.js +++ b/src/core/ready-no-deferred.js @@ -6,7 +6,6 @@ define( [ "use strict"; var readyCallbacks = [], - readyFiring = false, whenReady = function( fn ) { readyCallbacks.push( fn ); }, @@ -60,16 +59,11 @@ jQuery.extend( { whenReady = function( fn ) { readyCallbacks.push( fn ); - if ( !readyFiring ) { - readyFiring = true; - - while ( readyCallbacks.length ) { - fn = readyCallbacks.shift(); - if ( jQuery.isFunction( fn ) ) { - executeReady( fn ); - } + while ( readyCallbacks.length ) { + fn = readyCallbacks.shift(); + if ( jQuery.isFunction( fn ) ) { + executeReady( fn ); } - readyFiring = false; } }; |