Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Commit

Permalink
Better fail/done arguments detection for the always callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
blueimp committed Jun 28, 2011
1 parent d5bc1e8 commit e59d11c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jquery.fileupload.js
@@ -1,5 +1,5 @@
/*
* jQuery File Upload Plugin 5.0.2
* jQuery File Upload Plugin 5.0.3
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
Expand Down Expand Up @@ -484,10 +484,10 @@
}).fail(function (jqXHR, textStatus, errorThrown) {
that._onFail(jqXHR, textStatus, errorThrown, options);
}).always(function (a1, a2, a3) {
if (!a3 || typeof a3 === 'string') {
that._onAlways(undefined, a2, a1, a3, options);
} else {
if (a3 && a3.done) {
that._onAlways(a1, a2, a3, undefined, options);
} else {
that._onAlways(undefined, a2, a1, a3, options);
}
});
return jqXHR;
Expand Down

0 comments on commit e59d11c

Please sign in to comment.