diff --git a/packages/provider/src/adapter-lit-element.js b/packages/provider/src/adapter-lit-element.js index 9c832aa00f57ade88fd9009931a1ff7aa1582123..3635d6e55e7f00cbfd1832a27f10ed93f18cbea6 100644 --- a/packages/provider/src/adapter-lit-element.js +++ b/packages/provider/src/adapter-lit-element.js @@ -172,6 +172,13 @@ export class AdapterLitElement extends LitElement { } } + disconnectedCallback() { + const attrs = this.subscribe.split(','); + attrs.forEach(element => this.unSubscribeProviderFor(element)); + + super.disconnectedCallback(); + } + subscribeProviderFor(element) { console.log('AdapterLitElement(' + this.tagName + ') subscribeProviderFor( ' + element + ' )'); const pair = element.trim().split(':');