Skip to content

Commit 0c9cb2e

Browse files
committed
fix jqXHR object initialization
The jqXHR objects returned by data.submit() did not contain the abort function and thus could not be cancelled (Chrome 17.0.928.0 dev-m). This commit changes the variable assignment syntax slightly to ensure that the object is initialized properly.
1 parent ea0c62d commit 0c9cb2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jquery.fileupload.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,8 @@
491491
that._trigger('send', e, options) !== false &&
492492
(that._chunkedUpload(options) || $.ajax(options))) ||
493493
that._getXHRPromise(false, options.context, args)
494-
).done(function (result, textStatus, jqXHR) {
494+
);
495+
jqXHR.done(function (result, textStatus, jqXHR) {
495496
that._onDone(result, textStatus, jqXHR, options);
496497
}).fail(function (jqXHR, textStatus, errorThrown) {
497498
that._onFail(jqXHR, textStatus, errorThrown, options);

0 commit comments

Comments
 (0)