From 51da356a5f4adbb8b1666a8f26fc503bdb352144 Mon Sep 17 00:00:00 2001 From: Jonathan Ong Date: Sun, 29 Dec 2013 16:04:06 -0800 Subject: [PATCH] debug: check for fn._name as well --- lib/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/application.js b/lib/application.js index 98fb103..e1021bb 100644 --- a/lib/application.js +++ b/lib/application.js @@ -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; };