##// END OF EJS Templates
fixed tsx/traits.destroy to handle non-element dom nodes
cin -
r75:16678c6055f2 v1.2.1 default
parent child
Show More
@@ -110,9 +110,9 export function destroy(target: Node | I
110 } else if (isDestroyable(target)) {
110 } else if (isDestroyable(target)) {
111 target.destroy();
111 target.destroy();
112 } else if (isNode(target)) {
112 } else if (isNode(target)) {
113 const self = registry.byNode(target);
113 const w = isElementNode(target) ? registry.byNode(target) : undefined;
114 if (self) {
114 if (w) {
115 self.destroyRecursive();
115 w.destroyRecursive();
116 } else {
116 } else {
117 registry.findWidgets(target).forEach(destroy);
117 registry.findWidgets(target).forEach(destroy);
118 dom.destroy(target);
118 dom.destroy(target);
General Comments 0
You need to be logged in to leave comments. Login now