zskarte / zskarte-client

Found redundant literal in a logical expression JS-W1043
Anti-pattern
Minor
8 months ago8 months old
Logical expression with a literal operand will always evaluate to the same value
36  }
37
38  private async _retry<RESPONSE>(fn: Observable<RESPONSE>, options?: IApiRequestOptions): Promise<ApiResponse<RESPONSE>> {
39    const maxRetries = options?.retries || 3;40    let lastError: HttpErrorResponse = new HttpErrorResponse({ status: 0 });
41    for (let i = 0; i < maxRetries; i++) {
42      try {