From: Steve Mao Date: Sun, 21 Aug 2016 00:43:22 +0000 (+1000) Subject: Core: remove precautionary variable `readyFiring` X-Git-Tag: 3.1.1~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fcb8a1b3ebf53007637c12c376e3101681f57c02;p=jquery.git Core: remove precautionary variable `readyFiring` Close gh-3284 --- 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; } };