Skip to content

Commit

Permalink
build: avoid clone
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 13, 2019
1 parent 20dff55 commit fb0cc47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ const pretty = createPretty(DEFAULT_PRETTY)
const getPretty = opts => (isNil(opts) ? pretty : createPretty(opts))

const cleanError = error => {
const stack = !isNil(error.stack) ? cleanStack(error.stack) : null
const cleanError = { ...error, stack }
return cleanError
error.stack = !isNil(error.stack) ? cleanStack(error.stack) : null
return error
}

const beautyError = (error, opts) => {
Expand Down

0 comments on commit fb0cc47

Please sign in to comment.