Skip to content

Commit

Permalink
Fix compatibility when token/format not called as method
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jun 13, 2015
1 parent 713f59d commit 32dc749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ function createBufferStream(stream, interval) {
*/

function format(name, fmt) {
this[name] = fmt
morgan[name] = fmt
return this
}

Expand Down Expand Up @@ -496,6 +496,6 @@ function recordStartTime() {
*/

function token(name, fn) {
this[name] = fn
morgan[name] = fn
return this
}

0 comments on commit 32dc749

Please sign in to comment.