From fcb8a1b3ebf53007637c12c376e3101681f57c02 Mon Sep 17 00:00:00 2001 From: Steve Mao Date: Sun, 21 Aug 2016 10:43:22 +1000 Subject: [PATCH] Core: remove precautionary variable `readyFiring` Close gh-3284 --- src/core/ready-no-deferred.js | 14 ++++---------- 1 file 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; } }; -- 2.39.5