fix(ui): fix screen state

This commit is contained in:
sylenien 2022-10-28 12:33:00 +02:00
parent c9f54738ae
commit deb20f4e34

View file

@ -79,7 +79,8 @@ export default abstract class BaseScreen {
attach(parentElement: HTMLElement) {
if (this.parentElement) {
throw new Error("BaseScreen: Trying to attach an attached screen.");
this.parentElement = undefined
console.error("BaseScreen: Trying to attach an attached screen.");
}
parentElement.appendChild(this.screen);