Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 5, 2022
1 parent 26f1f8a commit 004f72e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/error/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { setErrorProperty } from './normalize/set.js'
// applied along the stack trace
// `normalizeError()` is called again to ensure the new `name|message` is
// reflected in `error.stack`.
// eslint-disable-next-line max-statements
export const mergeErrorCause = function (error) {
const parent = normalizeError(error)
const parentErrors = getAggregateErrors(parent)
Expand All @@ -43,6 +42,10 @@ export const mergeErrorCause = function (error) {
return parent
}

return mergeCause(parent, parentErrors)
}

const mergeCause = function (parent, parentErrors) {
const child = mergeErrorCause(parent.cause)
const message = mergeMessage(parent.message, child.message)
const mergedError = createError(parent, child, message)
Expand Down

0 comments on commit 004f72e

Please sign in to comment.