From 3a434434c420096cef478936ea21b33e9cfae30c Mon Sep 17 00:00:00 2001 From: terrycojones Date: Wed, 19 Jun 2013 22:36:32 +0100 Subject: [PATCH] Moved too-early assignment inside the if stmt where the var is actually used. Close gh-1292. --- .mailmap | 1 + src/callbacks.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index f51476829..576f2fb4c 100644 --- a/.mailmap +++ b/.mailmap @@ -91,3 +91,4 @@ Yehuda Katz Yehuda Katz Yehuda Katz Yiming He +Terry Jones 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 { -- 2.39.5