diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 6cbd0887f705634a567f6508511737b4850c783b..7b79d655a874978c0a8cb90a26c8206cd958ac86 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -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; } diff --git a/src/app/services/formulaire.service.ts b/src/app/services/formulaire.service.ts index 462b312c4440326badecbb5202120e8c6a28d845..a9a6a716006c62da7d8fcc34ab5d9202c713408f 100644 --- a/src/app/services/formulaire.service.ts +++ b/src/app/services/formulaire.service.ts @@ -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 */