Skip to content

Commit

Permalink
fix: remove useless optional chaining operator
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptodev-2s committed Mar 5, 2024
1 parent 04689ef commit fef0b36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/controller-utils/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,12 @@ function logOrRethrowError(error: unknown, codesToCatch: number[] = []) {

if (error instanceof Error) {
const includesErrorCodeToCatch = codesToCatch.some((code) =>
error.message?.includes(`Fetch failed with status '${code}'`),
error.message.includes(`Fetch failed with status '${code}'`),
);

if (
includesErrorCodeToCatch ||
error.message?.includes('Failed to fetch') ||
error.message.includes('Failed to fetch') ||
error === TIMEOUT_ERROR
) {
console.error(error);
Expand Down

0 comments on commit fef0b36

Please sign in to comment.