From 3a434434c420096cef478936ea21b33e9cfae30c Mon Sep 17 00:00:00 2001 From: terrycojones Date: Wed, 19 Jun 2013 22:36:32 +0100 Subject: Moved too-early assignment inside the if stmt where the var is actually used. Close gh-1292. --- src/callbacks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/callbacks.js b/src/callbacks.js index 851333114..84c834666 100644 --- a/src/callbacks.js +++ b/src/callbacks.js @@ -171,9 +171,9 @@ jQuery.Callbacks = function( options ) { }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; if ( firing ) { stack.push( args ); } else { -- cgit v1.2.3