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

Commit a57e011

Browse files
committed
Fix printer
1 parent 0bbe536 commit a57e011

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
!dist
2+
lib
3+
examples
4+
docs
5+
.github

lib/printer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @param {Function[]} handlers
1010
*/
1111
function print(path, method, handlers) {
12-
const handlersNames = handlers.map(handler => `${handler.name}()`).join(', ')
12+
const handlersNames = handlers.map(handler => `${handler ? handler.name : '<no-op>'}()`).join(', ')
1313

1414
console.log(method.toUpperCase(), path.join('/'), '->', handlersNames)
1515
}

0 commit comments

Comments
 (0)