[Bug] Fix widget remove when node is deleted (#2918)

This commit is contained in:
Chenlei Hu
2025-03-07 17:48:37 -05:00
committed by GitHub
parent 082f0061f6
commit fb0a134278

View File

@@ -360,7 +360,7 @@ LGraphNode.prototype.addDOMWidget = function <
const onRemoved = this.onRemoved
this.onRemoved = function (this: LGraphNode) {
element.remove()
widget.onRemove()
elementWidgets.delete(this)
onRemoved?.call(this)
}