Removed the on disconnected callback for elements since the only subscriber is the template and the template is already deconstructed by the element so there is no need to call it twice via the callback.

This commit is contained in:
2021-01-06 08:51:24 -08:00
parent 5e276a0ddb
commit fb49e9ec35
2 changed files with 0 additions and 13 deletions

View File

@ -667,12 +667,6 @@ class IgniteTemplate {
this.element.template = this;
}
//If the element has a onDisconnected function, attach to it
//(This way if a custom element is removed we can deconstruct and cleanup)
if (this.element.onDisconnected !== undefined) {
this.element.onDisconnected = () => this.deconstruct();
}
//Invoke any refs we have and pass back the element reference.
this._refs.forEach((ref) => ref(this.element));
}