Skip to content

Commit

Permalink
Allow function to be passed & executed if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Thompson committed Sep 2, 2017
1 parent 3e1849d commit 9aae77f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/debug.js
Expand Up @@ -221,5 +221,6 @@ function enabled(name) {

function coerce(val) {
if (val instanceof Error) return val.stack || val.message;
if (typeof val === 'function') return val();
return val;
}

0 comments on commit 9aae77f

Please sign in to comment.