prevent duplicate addToDom
This commit is contained in:
parent
0e4ae45d01
commit
20240215f9
1 changed files with 1 additions and 0 deletions
|
@ -149,6 +149,7 @@ export class Agent {
|
||||||
}
|
}
|
||||||
|
|
||||||
addToDom(parent: HTMLElement = document.body) {
|
addToDom(parent: HTMLElement = document.body) {
|
||||||
|
if (this.cnv.parentElement) return;
|
||||||
parent.appendChild(this.cnv);
|
parent.appendChild(this.cnv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue