Fix for #8421. Makes sure resolveWith can be called with only one parameter.
[jquery.git] / src / core.js
index d77c818..1e7250f 100644 (file)
@@ -837,18 +837,14 @@ jQuery.extend({
                                // resolve with given context and args
                                resolveWith: function( context, args ) {
                                        if ( !cancelled && !fired && !firing ) {
+                                               // make sure args are available (#8421)
+                                               args = args || [];
                                                firing = 1;
                                                try {
                                                        while( callbacks[ 0 ] ) {
                                                                callbacks.shift().apply( context, args );
                                                        }
                                                }
-                                               // We have to add a catch block for
-                                               // IE prior to 8 or else the finally
-                                               // block will never get executed
-                                               catch (e) {
-                                                       throw e;
-                                               }
                                                finally {
                                                        fired = [ context, args ];
                                                        firing = 0;