fix: clear free list on element update
This commit is contained in:
parent
54c1009d24
commit
319822d93d
|
@ -108,6 +108,10 @@ export class TextNode {
|
|||
|
||||
export class TextNodeRenderer extends Proton.BaseRender {
|
||||
|
||||
static clearFreeList() {
|
||||
this._freeList = [];
|
||||
}
|
||||
|
||||
static get freeList() {
|
||||
if (!this._freeList) {
|
||||
this._freeList = [];
|
||||
|
@ -118,12 +122,12 @@ export class TextNodeRenderer extends Proton.BaseRender {
|
|||
constructor(selector, stage) {
|
||||
super();
|
||||
this._body = new TextNode('');
|
||||
this.freeList = [];
|
||||
this.name = 'NodeRenderer';
|
||||
this.queued = [];
|
||||
this.stage = stage;
|
||||
const promise = stage.findUiElement(selector);
|
||||
promise.then((element) => {
|
||||
this.constructor.clearFreeList();
|
||||
this.parent = element;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user