element-vir 26.14.5 → 26.14.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -208,7 +208,7 @@ function internalDefineElement(init) {
208
208
  }
209
209
  disconnectedCallback() {
210
210
  super.disconnectedCallback();
211
- if (init.cleanup) {
211
+ if (init.cleanup && this._stateCalled) {
212
212
  const renderParams = this.createRenderParams();
213
213
  if (init.cleanup(renderParams) instanceof Promise) {
214
214
  throw new TypeError(`cleanup in '${init.tagName}' cannot be asynchronous`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-vir",
3
- "version": "26.14.5",
3
+ "version": "26.14.6",
4
4
  "keywords": [
5
5
  "custom",
6
6
  "web",