Merge pull request #623 from janriemer/fix-comment

fix(app): fix comment for 'experimental' check
This commit is contained in:
Yiyu He 2015-12-16 22:13:57 +08:00
commit e6dcc9f7b7

View file

@ -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 || '-');