mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 08:34:08 +02:00
Use Array.find
instead of Array.filter
This commit is contained in:
@@ -150,8 +150,8 @@ class Collapse {
|
||||
|
||||
const container = SelectorEngine.findOne(this._selector)
|
||||
if (actives) {
|
||||
const tempActiveData = actives.filter(elem => container !== elem)
|
||||
activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY) : null
|
||||
const tempActiveData = actives.find(elem => container !== elem)
|
||||
activesData = tempActiveData ? Data.getData(tempActiveData, DATA_KEY) : null
|
||||
|
||||
if (activesData && activesData._isTransitioning) {
|
||||
return
|
||||
|
Reference in New Issue
Block a user