diff --git a/front/src/Administration/ConsoleGlobalMessageManager.ts b/front/src/Administration/ConsoleGlobalMessageManager.ts index 2c576cba..21bd4514 100644 --- a/front/src/Administration/ConsoleGlobalMessageManager.ts +++ b/front/src/Administration/ConsoleGlobalMessageManager.ts @@ -33,6 +33,11 @@ export class ConsoleGlobalMessageManager { } initialise() { + const mainSectionDiv = HtmlUtils.getElementByIdOrFail('main-container'); + mainSectionDiv.childNodes.forEach((c : ChildNode) => { + c.remove(); + }); + const buttonText = document.createElement('p'); buttonText.innerText = 'Console'; @@ -50,7 +55,6 @@ export class ConsoleGlobalMessageManager { this.createTextMessagePart(); - const mainSectionDiv = HtmlUtils.getElementByIdOrFail('main-container'); mainSectionDiv.appendChild(this.divMainConsole); }