Skip to content

Commit c205f56

Browse files
committed
replaced .then with .pipe in js/jquery.fileupload.js for jquery compatibility in auditboard/frontend
1 parent dd244fd commit c205f56

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

js/jquery.fileupload.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -656,15 +656,15 @@
656656
data.process = function (resolveFunc, rejectFunc) {
657657
if (resolveFunc || rejectFunc) {
658658
data._processQueue = this._processQueue =
659-
(this._processQueue || getPromise([this])).then(
659+
(this._processQueue || getPromise([this])).pipe(
660660
function () {
661661
if (data.errorThrown) {
662662
return $.Deferred()
663663
.rejectWith(that, [data]).promise();
664664
}
665665
return getPromise(arguments);
666666
}
667-
).then(resolveFunc, rejectFunc);
667+
).pipe(resolveFunc, rejectFunc);
668668
}
669669
return this._processQueue || getPromise([this]);
670670
};
@@ -949,9 +949,9 @@
949949
if (this.options.limitConcurrentUploads > 1) {
950950
slot = $.Deferred();
951951
this._slots.push(slot);
952-
pipe = slot.then(send);
952+
pipe = slot.pipe(send);
953953
} else {
954-
this._sequence = this._sequence.then(send, send);
954+
this._sequence = this._sequence.pipe(send, send);
955955
pipe = this._sequence;
956956
}
957957
// Return the piped Promise object, enhanced with an abort method,
@@ -1144,7 +1144,7 @@
11441144
$.map(entries, function (entry) {
11451145
return that._handleFileTreeEntry(entry, path);
11461146
})
1147-
).then(function () {
1147+
).pipe(function () {
11481148
return Array.prototype.concat.apply(
11491149
[],
11501150
arguments
@@ -1213,7 +1213,7 @@
12131213
return $.when.apply(
12141214
$,
12151215
$.map(fileInput, this._getSingleFileInputFiles)
1216-
).then(function () {
1216+
).pipe(function () {
12171217
return Array.prototype.concat.apply(
12181218
[],
12191219
arguments

0 commit comments

Comments
 (0)