Skip to content

Commit

Permalink
fix: circular calls (#8955)
Browse files Browse the repository at this point in the history
  • Loading branch information
guanbinrui committed Mar 6, 2023
1 parent 6774b6d commit 223aa6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web3-shared/evm/src/libs/ErrorEditor.ts
Expand Up @@ -29,9 +29,9 @@ export class ErrorEditor {

{
const responseError = this.response?.error as unknown
if (responseError instanceof Error) return ErrorEditor.fromError(responseError, this.fallback).error
if (responseError instanceof Error) return responseError
if (responseError && typeof (responseError as Error).message === 'string')
return ErrorEditor.fromError(responseError, this.fallback).error
return new Error((responseError as Error).message)
if (responseError && typeof responseError === 'string') return new Error(responseError)
}

Expand Down

0 comments on commit 223aa6c

Please sign in to comment.