Skip to content

Commit

Permalink
fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanousos committed May 9, 2012
1 parent 8a54bf7 commit 4f4863a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ If you have more sophisticated logging needs, or don't wish to extend

* [Guillermo Rauch](https://github.com/guille)
* [Kilian Ciuffolo](https://github.com/kilianc)
* [Nicholas Manousos](https://github.com/nmanousos)

## License

Expand Down
6 changes: 5 additions & 1 deletion console-trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ console.traceFormat = function (call, method) {
}

if (console.traceOptions.colors !== false) {
color = console.traceOptions.colors === true ? defaultColors[method] : console.traceOptions.colors[method];
if (console.traceOptions.colors === undefined || console.traceOptions.colors[method] === undefined) {
color = defaultColors[method];
} else {
color = console.traceOptions.colors[method];
}
}

if (console.traceOptions.right) {
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('./console-trace')
require('./console-trace')() // should work even if I require it twice
require('./console-trace')({}) // should work even if I require it twice

process.stdout.write('\n');

Expand Down

0 comments on commit 4f4863a

Please sign in to comment.