Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit a6a2a2b

Browse files
committed
Handle displayName for printRoutes
1 parent 542fce6 commit a6a2a2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/printer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { flattenRoutes } from './flatten'
1212
* @return {string}
1313
*/
1414
function print(path, method, handlers) {
15-
const handlersNames = handlers.map(handler => `${handler.name || '<function>'}()`).join(', ')
15+
const handlersNames = handlers.map(handler => `${handler.displayName || handler.name || '<function>'}()`).join(', ')
1616

1717
return `${method.toUpperCase()} ${path} -> ${handlersNames}`
1818
}

0 commit comments

Comments
 (0)