Commit 627c2156 authored by Mathias Chouet's avatar Mathias Chouet 🍝
Browse files

Properly clear Formulaires list in service after buggy session load

parent 30f3d6b0
Pipeline #15555 passed with stages
in 17 minutes and 51 seconds
......@@ -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
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment