From e1193ad95aa3c072ac4f45fa39f02d3d1cd637f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 1 Oct 2020 17:16:36 +0200 Subject: [PATCH] Fixing console removal --- back/src/Model/Group.ts | 3 +-- front/src/Administration/ConsoleGlobalMessageManager.ts | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/back/src/Model/Group.ts b/back/src/Model/Group.ts index 16dd6cd5..a67383f0 100644 --- a/back/src/Model/Group.ts +++ b/back/src/Model/Group.ts @@ -1,7 +1,6 @@ -import { World, ConnectCallback, DisconnectCallback } from "./World"; +import { ConnectCallback, DisconnectCallback } from "./World"; import { User } from "./User"; import {PositionInterface} from "_Model/PositionInterface"; -import {uuid} from "uuidv4"; import {Movable} from "_Model/Movable"; import {PositionNotifier} from "_Model/PositionNotifier"; diff --git a/front/src/Administration/ConsoleGlobalMessageManager.ts b/front/src/Administration/ConsoleGlobalMessageManager.ts index e60b8a3d..135f1799 100644 --- a/front/src/Administration/ConsoleGlobalMessageManager.ts +++ b/front/src/Administration/ConsoleGlobalMessageManager.ts @@ -36,10 +36,8 @@ export class ConsoleGlobalMessageManager { } initialise() { - try { - HtmlUtils.removeElementByIdOrFail(CLASS_CONSOLE_MESSAGE); - }catch (err){ - console.error(err); + for (const elem of document.getElementsByClassName(CLASS_CONSOLE_MESSAGE)) { + elem.remove(); } const typeConsole = document.createElement('input');