From 1b88a52f1613c6169aad2b982f4b68ccb47b2735 Mon Sep 17 00:00:00 2001 From: Martin Iwanowski Date: Thu, 24 Mar 2016 10:01:53 +0100 Subject: [PATCH] pass app.wrapper to compose --- lib/application.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/application.js b/lib/application.js index 83b607f5c..74fe0ef3b 100644 --- a/lib/application.js +++ b/lib/application.js @@ -41,6 +41,7 @@ module.exports = class Application extends Emitter { super(); this.proxy = false; + this.wrapper = false; this.middleware = []; this.subdomainOffset = 2; this.env = process.env.NODE_ENV || 'development'; @@ -124,7 +125,7 @@ module.exports = class Application extends Emitter { */ callback() { - const fn = compose(this.middleware); + const fn = compose(this.middleware, this.wrapper); if (!this.listeners('error').length) this.on('error', this.onerror);