mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-21 21:40:48 +00:00
Use Array.find
instead of Array.filter
This commit is contained in:
parent
53ec604eb1
commit
eaf616c653
@ -49,7 +49,6 @@
|
|||||||
"unicorn/no-null": "off",
|
"unicorn/no-null": "off",
|
||||||
"unicorn/no-unused-properties": "error",
|
"unicorn/no-unused-properties": "error",
|
||||||
"unicorn/no-useless-undefined": "off",
|
"unicorn/no-useless-undefined": "off",
|
||||||
"unicorn/prefer-array-find": "off",
|
|
||||||
"unicorn/prefer-dataset": "off",
|
"unicorn/prefer-dataset": "off",
|
||||||
"unicorn/prefer-node-append": "off",
|
"unicorn/prefer-node-append": "off",
|
||||||
"unicorn/prefer-node-remove": "off",
|
"unicorn/prefer-node-remove": "off",
|
||||||
|
@ -150,8 +150,8 @@ class Collapse {
|
|||||||
|
|
||||||
const container = SelectorEngine.findOne(this._selector)
|
const container = SelectorEngine.findOne(this._selector)
|
||||||
if (actives) {
|
if (actives) {
|
||||||
const tempActiveData = actives.filter(elem => container !== elem)
|
const tempActiveData = actives.find(elem => container !== elem)
|
||||||
activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY) : null
|
activesData = tempActiveData ? Data.getData(tempActiveData, DATA_KEY) : null
|
||||||
|
|
||||||
if (activesData && activesData._isTransitioning) {
|
if (activesData && activesData._isTransitioning) {
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user