Skip to content

Commit

Permalink
Release version 5.3.5 – Fix migration to newer RxJS API getting "this…
Browse files Browse the repository at this point in the history
…" wrong
  • Loading branch information
alessiostalla committed Feb 4, 2024
1 parent 32646e9 commit e137ee9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ui/projects/portofino/src/lib/portofino.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,19 @@ export class PortofinoService {
//Avoid refreshing the token on startup as this might hit the wrong login action
const headers = {};
headers[NO_REFRESH_TOKEN_HEADER] = true;
const portofino = this;
this.http.get<ApiInfo>(this.localApiPath, { headers: headers }).subscribe({
next(response) {
this.apiRoot = this.sanitizeApiRoot(response.apiRoot);
this.injector.get(AuthenticationStrategy).init({
apiRoot: this.apiRoot
portofino.apiRoot = portofino.sanitizeApiRoot(response.apiRoot);
portofino.injector.get(AuthenticationStrategy).init({
apiRoot: portofino.apiRoot
});
if (response.disableAdministration) {
this.localApiPath = null; //Disable local API
portofino.localApiPath = null; //Disable local API
}
},
error() {
this.fallbackInit();
portofino.fallbackInit();
}
});
}
Expand Down

0 comments on commit e137ee9

Please sign in to comment.