git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for #8421. Makes sure resolveWith can be called with only one parameter.
[jquery.git]
/
src
/
core.js
diff --git
a/src/core.js
b/src/core.js
index
d77c818
..
1e7250f
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-837,18
+837,14
@@
jQuery.extend({
// resolve with given context and args
resolveWith: function( context, args ) {
if ( !cancelled && !fired && !firing ) {
// 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 );
}
}
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;
finally {
fired = [ context, args ];
firing = 0;