diff options
Diffstat (limited to 'src/util/sugar.js')
-rw-r--r-- | src/util/sugar.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/util/sugar.js b/src/util/sugar.js index 808a7e1..e8fdf93 100644 --- a/src/util/sugar.js +++ b/src/util/sugar.js @@ -405,7 +405,7 @@ export function _withAggregate(mode, aggregateOpts, fn) { } export function showAggregate(topError, { - pathToFile = (p) => p, + pathToFileURL = f => f, showTraces = true, } = {}) { const recursive = (error, {level}) => { @@ -429,9 +429,7 @@ export function showAggregate(topError, { ? '- ' + stackLine .trim() - .replace(/file:\/\/(.*\.js)/, (match, pathname) => - pathToFile(pathname) - ) + .replace(/file:\/\/.*\.js/, (match) => pathToFileURL(match)) : '(no stack trace)'; header += ` ${color.dim(tracePart)}`; } |