Skip to content

Commit 20b87de

Browse files
committed
fix(middleware): fix WARN log when passing undefined error handler to promise.then
Closes #2227
1 parent 1e526e3 commit 20b87de

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/middleware/common.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var PromiseContainer = function () {
1111
var promise
1212

1313
this.then = function (success, error) {
14+
error = error || _.noop
1415
return promise.then(success).catch(error)
1516
}
1617

0 commit comments

Comments
 (0)