From 8a1e4ddb77e53b7d9cd00ae8e57972f92546600b Mon Sep 17 00:00:00 2001 From: janriemer Date: Wed, 16 Dec 2015 11:48:13 +0100 Subject: [PATCH] fix(app): fix comment for 'experimental' check comment stated that when 'experimental' is false, es7 async would be allowed, but that is not the case --- lib/application.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/application.js b/lib/application.js index ef3533e..36cebb6 100644 --- a/lib/application.js +++ b/lib/application.js @@ -101,7 +101,8 @@ app.toJSON = function(){ app.use = function(fn){ if (!this.experimental) { - // es7 async functions are allowed + // es7 async functions are not allowed, + // so we have to make sure that `fn` is a generator function assert(fn && 'GeneratorFunction' == fn.constructor.name, 'app.use() requires a generator function'); } debug('use %s', fn._name || fn.name || '-');