Skip to content

Commit

Permalink
chore: move timeout from let to const
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekA1509 committed Jan 4, 2024
1 parent bde1774 commit adfeee4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Common/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ function fetchInTime(
const { signal } = controller
const timeoutPromise: Promise<ResponseType> = new Promise((resolve, reject) => {
const requestTimeout = (window as any)?._env_?.GLOBAL_API_TIMEOUT ?? FALLBACK_REQUEST_TIMEOUT
let timeout = options?.timeout ? options.timeout : requestTimeout
const timeout = options?.timeout ? options.timeout : requestTimeout

setTimeout(() => {
controller.abort()
reject({
Expand Down

0 comments on commit adfeee4

Please sign in to comment.