diff --git a/src/app/app.component.ts b/src/app/app.component.ts index d347f7efd3be6d6a68be0a797b0a7be1b31528cc..0fc5680c83c8b12c0832e0493f7c6b42b00d2124 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -425,6 +425,12 @@ export class AppComponent implements OnInit, OnDestroy, Observer { this.setActiveCalc(id); } + private toFirstCalc() { + if (this.calculators.length > 0) { + this.toCalc(this.calculators[0].uid); + } + } + /** * récupération du composant affiché par le routeur */ @@ -471,6 +477,8 @@ export class AppComponent implements OnInit, OnDestroy, Observer { .then((data) => { if (data.hasErrors) { this.notificationsService.notify(this.intlService.localizeText("ERROR_PROBLEM_LOADING_SESSION"), 3500); + } else { + this.toFirstCalc(); } }) .catch((err) => {