Skip to content

Commit 91bd488

Browse files
author
elic
committed
danialfarid#138: chaining .then() calls together now works as expected
1 parent 3053f2f commit 91bd488

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

demo/war/js/angular-file-upload.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ angularFileUpload.service('$upload', ['$http', '$rootScope', '$timeout', functio
5858
promise.then = (function(promise, origThen) {
5959
return function(s, e, p) {
6060
config.progress = p || config.progress;
61-
origThen.apply(promise, [s, e, p]);
62-
return promise;
61+
return origThen.apply(promise, [s, e, p]);
6362
};
6463
})(promise, promise.then);
6564

dist/angular-file-upload.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ angularFileUpload.service('$upload', ['$http', '$rootScope', '$timeout', functio
5858
promise.then = (function(promise, origThen) {
5959
return function(s, e, p) {
6060
config.progress = p || config.progress;
61-
origThen.apply(promise, [s, e, p]);
62-
return promise;
61+
return origThen.apply(promise, [s, e, p]);
6362
};
6463
})(promise, promise.then);
6564

dist/angular-file-upload.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)