Return middleware chain promise from callback()
(#848)
The v2.x version of 8836cd3 on master.
This commit is contained in:
parent
65c130db5b
commit
e6539e1cf2
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ module.exports = class Application extends Emitter {
|
|||
const onerror = err => ctx.onerror(err);
|
||||
const handleResponse = () => respond(ctx);
|
||||
onFinished(res, onerror);
|
||||
fn(ctx).then(handleResponse).catch(onerror);
|
||||
return fn(ctx).then(handleResponse).catch(onerror);
|
||||
};
|
||||
|
||||
return handleRequest;
|
||||
|
|
Loading…
Reference in a new issue