Skip to content

Commit

Permalink
rename some vars to be more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot committed Oct 10, 2021
1 parent 4b83502 commit 93cc73a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/src/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ class Collapse extends BaseComponent {
return
}

let actives = []
let activeChildren = []

if (this._config.parent) { // find active children
actives = this._getFirstLevelChildren(SELECTOR_ACTIVES)
activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES)
.filter(el => el !== this._element)
.map(el => Collapse.getOrCreateInstance(el, { toggle: false }))
}

if (actives.length && actives[0]._isTransitioning) {
if (activeChildren.length && activeChildren[0]._isTransitioning) {
return
}

Expand All @@ -137,8 +137,8 @@ class Collapse extends BaseComponent {
return
}

for (const elemActive of actives) {
elemActive.hide()
for (const activeInstance of activeChildren) {
activeInstance.hide()
}

const dimension = this._getDimension()
Expand Down

0 comments on commit 93cc73a

Please sign in to comment.