Skip to content
Snippets Groups Projects
Commit 46fc4f8e authored by mathias.chouet's avatar mathias.chouet
Browse files

Fix #255 - open first module after loading session

parent 4ff62d2d
No related branches found
No related tags found
No related merge requests found
......@@ -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) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment