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

Properly clear Formulaires list in service after buggy session load

parent 30f3d6b0
No related branches found
No related tags found
No related merge requests found
Pipeline #138345 passed
......@@ -621,6 +621,8 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
// just to be sure, get rid of any Nub possibly stuck in session without any form attached
Session.getInstance().clear();
Session.getInstance().documentation = "";
// just to be sure, get rid of any Formulaire possibly stuck in the service without any Nub attached
this.formulaireService.clearFormulaires();
// restore notifications
this.appSetupService.enableNotifications = oldNotifState;
}
......
......@@ -64,13 +64,18 @@ export class FormulaireService extends Observable {
private notificationsService: NotificationsService
) {
super();
this._formulaires = [];
this.clearFormulaires();
}
public get formulaires(): FormulaireDefinition[] {
return this._formulaires;
}
/** Removes all formulaires from the list */
public clearFormulaires() {
this._formulaires = [];
}
/**
* Retourne le titre complet du type de module de calcul, dans la langue en cours
*/
......
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