diff --git a/front/src/WebRtc/HtmlUtils.ts b/front/src/WebRtc/HtmlUtils.ts index 9eab1341..168fba1e 100644 --- a/front/src/WebRtc/HtmlUtils.ts +++ b/front/src/WebRtc/HtmlUtils.ts @@ -2,7 +2,7 @@ export class HtmlUtils { public static getElementByIdOrFail(id: string): T { const elem = document.getElementById(id); if (HtmlUtils.isHtmlElement(elem)) { - return elem + return elem; } throw new Error("Cannot find HTML element with id '"+id+"'"); } @@ -11,7 +11,7 @@ export class HtmlUtils { const elem = document.getElementById(id); if (HtmlUtils.isHtmlElement(elem)) { elem.remove(); - return elem + return elem; } throw new Error("Cannot find HTML element with id '"+id+"'"); } @@ -24,6 +24,6 @@ export class HtmlUtils { } private static isHtmlElement(elem: HTMLElement | null): elem is T { - return elem !== null + return elem !== null; } }