]> source.dussan.org Git - jquery.git/commitdiff
Core: remove precautionary variable `readyFiring`
authorSteve Mao <maochenyan@gmail.com>
Sun, 21 Aug 2016 00:43:22 +0000 (10:43 +1000)
committerTimmy Willison <4timmywil@gmail.com>
Mon, 19 Sep 2016 17:08:39 +0000 (13:08 -0400)
Close gh-3284

src/core/ready-no-deferred.js

index 5baed2e5c27f515c8f512b5a44fca59b6ada3761..02d6014013f4ad39394f4aa0f4ea5fa99c581844 100644 (file)
@@ -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;
                        }
                };