Skip to content

Commit

Permalink
Fixed error when using custom error codes > 800. The default color at…
Browse files Browse the repository at this point in the history
… index 0 is used by default. (#73)
  • Loading branch information
Seidel-Michael authored and haoxins committed Jul 17, 2019
1 parent d04c9d2 commit 0f4e7a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function log (print, ctx, start, len, err, event) {

// set the color of the status code;
const s = status / 100 | 0
const color = colorCodes.hasOwnProperty(s) ? colorCodes[s] : 0
const color = colorCodes.hasOwnProperty(s) ? colorCodes[s] : colorCodes[0]

// get the human readable response length
let length
Expand Down

0 comments on commit 0f4e7a1

Please sign in to comment.