fix: actually remove all old elements
This commit is contained in:
parent
319822d93d
commit
40f690e4a1
|
@ -127,7 +127,13 @@ export class TextNodeRenderer extends Proton.BaseRender {
|
|||
this.stage = stage;
|
||||
const promise = stage.findUiElement(selector);
|
||||
promise.then((element) => {
|
||||
this.constructor.clearFreeList();
|
||||
if (this.parent) {
|
||||
const freeList = this.constructor.freeList;
|
||||
while (freeList.length > 0) {
|
||||
const node = freeList.pop();
|
||||
this.parent.removeChild(node);
|
||||
}
|
||||
}
|
||||
this.parent = element;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user