Remove node on actor crashes

This commit is contained in:
Tony Garnock-Jones 2024-03-08 12:11:45 +01:00
parent 1dab59bef4
commit ab353b525b
1 changed files with 2 additions and 0 deletions

View File

@ -32,8 +32,10 @@ export class Widget implements EventTarget {
constructor (private nodeGenerator: NodeGenerator) {
this.facet = Turn.activeFacet;
const cancelAtExit = this.facet.actor.atExit(() => this.node.remove());
on stop {
this.node.remove();
cancelAtExit();
}
const thisTemplate = template();