diff --git a/src/debug.js b/src/debug.js index 77e6384a..c5417f72 100644 --- a/src/debug.js +++ b/src/debug.js @@ -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; }