Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Fix the order of httpClient testing conditions (#1402)
Browse files Browse the repository at this point in the history
  • Loading branch information
popovicsandras authored Aug 3, 2022
1 parent 8240936 commit 434c24e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/api-clients/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ export abstract class ApiClient {
constructor(legacyApi?: AlfrescoApiType);
constructor(httpClient: HttpClient);
constructor(httpClient?: AlfrescoApiType | HttpClient) {
// TODO: remove legacyApi?: AlfrescoApi option and clean up this code. BREAKING CHANGE!
if (httpClient instanceof LegacyAlfrescoApi) {
this.alfrescoApi = httpClient as AlfrescoApiType;
} else {
if (!(httpClient instanceof LegacyAlfrescoApi)) {
this.httpClient = httpClient as HttpClient;
} else {
// TODO: remove legacyApi?: AlfrescoApi option and clean up this code. BREAKING CHANGE!
this.alfrescoApi = httpClient as AlfrescoApiType;

}
}

Expand Down

0 comments on commit 434c24e

Please sign in to comment.