Skip to content

Commit

Permalink
Merge pull request #21 from zipper/fix-constructor-order
Browse files Browse the repository at this point in the history
fix: Order of operations in constructor
  • Loading branch information
zipper authored Apr 5, 2023
2 parents 6a7fab5 + 61db236 commit 7f8c420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CollapsableItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ export class CollapsableItem {
throw new Error(`Collapsable: Missing control or box element.'`)
}

this.element = element as HTMLCollapsableItem
this.controlElements = Array.from(controlElements)
this.controlInteractiveElements = []
this.boxElements = Array.from(boxElements)

this.prepareDOM()
this.addHandlers()

this.element = element as HTMLCollapsableItem
this.element.collapsableItem = this
}

Expand Down

0 comments on commit 7f8c420

Please sign in to comment.