debug: check for fn._name as well
This commit is contained in:
parent
ebed2a34af
commit
51da356a5f
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ app.listen = function(){
|
|||
|
||||
app.use = function(fn){
|
||||
assert('GeneratorFunction' == fn.constructor.name, 'app.use() requires a generator function');
|
||||
debug('use %s', fn.name || '-');
|
||||
debug('use %s', fn._name || fn.name || '-');
|
||||
this.middleware.push(fn);
|
||||
return this;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue