Skip to content

Commit

Permalink
Improve error.stack
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 16, 2019
1 parent adb3f23 commit f04ea9a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ const PLUGIN_ERROR_OPTS = {

// `plugin-error` repeats the error message by printing both `error.message`
// and the first line of `error.stack`. We remove that last one.
const getStack = function({ stack }) {
return stack
.split('\n')
.slice(1)
.join('\n')
const getStack = function({ stack, message }) {
return stack.replace(message, '')
}

0 comments on commit f04ea9a

Please sign in to comment.