Skip to content

Commit 4a606db

Browse files
kylebuch8mwcz
authored andcommitted
moving this.button initialization to the constructor (#419)
Fixes #418
1 parent f8f9004 commit 4a606db

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

elements/pfe-accordion/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elements/pfe-accordion/src/pfe-accordion.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ class PfeAccordionHeader extends PFElement {
397397
constructor() {
398398
super(PfeAccordionHeader);
399399

400+
this.button = this.shadowRoot.querySelector("button");
401+
400402
this._init = this._init.bind(this);
401403
this._clickHandler = this._clickHandler.bind(this);
402404
this._observer = new MutationObserver(this._init);
@@ -447,8 +449,6 @@ class PfeAccordionHeader extends PFElement {
447449
this.pfeId = `${PfeAccordionHeader.tag}-${generateId()}`;
448450
}
449451

450-
this.button = this.shadowRoot.querySelector("button");
451-
452452
const child = this.children[0];
453453
let isHeaderTag = false;
454454

0 commit comments

Comments
 (0)