Skip to content

Commit

Permalink
fix(uip-plugin): set right 'state:change' listener
Browse files Browse the repository at this point in the history
  • Loading branch information
nattallius committed Apr 14, 2021
1 parent 93c504c commit e3755f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export abstract class UIPPlugin extends ESLBaseElement {
return this._root;
}
protected set root(root: UIPRoot | null) {
this._root && this._root.removeEventListener('state:change', this.handleChange);
this._root && this._root.removeEventListener('state:change', this._onRootChange);
this._root = root;
this._root && this._root.addEventListener('state:change', this.handleChange);
this._root && this._root.addEventListener('state:change', this._onRootChange);
}

protected connectedCallback() {
Expand Down

0 comments on commit e3755f1

Please sign in to comment.