Fix remove last childnode
This commit is contained in:
parent
e0ae79eaf1
commit
1829912c91
1 changed files with 5 additions and 1 deletions
|
@ -33,6 +33,11 @@ export class ConsoleGlobalMessageManager {
|
|||
}
|
||||
|
||||
initialise() {
|
||||
const mainSectionDiv = HtmlUtils.getElementByIdOrFail<HTMLDivElement>('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<HTMLDivElement>('main-container');
|
||||
mainSectionDiv.appendChild(this.divMainConsole);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue