Refactor application.js - use arrow function in callback

master
Slobodan Stojanovic 2015-10-24 16:19:56 +02:00
parent 863fce310b
commit 0df400fa60
1 changed files with 1 additions and 3 deletions

View File

@ -115,9 +115,7 @@ module.exports = class Application extends Emitter {
res.statusCode = 404;
const ctx = this.createContext(req, res);
onFinished(res, ctx.onerror);
fn(ctx).then(function() {
respond(ctx);
}).catch(ctx.onerror);
fn(ctx).then(() => respond(ctx)).catch(ctx.onerror);
};
}