Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2020-03-25 17:35:02 +0300
committerGitHub <noreply@github.com>2020-03-25 17:35:02 +0300
commit26d86fce2a10f5c9e295b0acf5e6381ff21368b4 (patch)
tree63ed06cb159ad7b625aa6b4c8d7460a1a269db43 /js/src/scrollspy.js
parent98c45986962f8ab16bc630722e96dbfb048079b3 (diff)
fix: remove make array util function (#30430)
Diffstat (limited to 'js/src/scrollspy.js')
-rw-r--r--js/src/scrollspy.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js
index dd68ed386e..0f04020f84 100644
--- a/js/src/scrollspy.js
+++ b/js/src/scrollspy.js
@@ -9,7 +9,6 @@ import {
getjQuery,
getSelectorFromElement,
getUID,
- makeArray,
typeCheckConfig
} from './util/index'
import Data from './dom/data'
@@ -116,7 +115,7 @@ class ScrollSpy {
this._scrollHeight = this._getScrollHeight()
- const targets = makeArray(SelectorEngine.find(this._selector))
+ const targets = SelectorEngine.find(this._selector)
targets
.map(element => {
@@ -286,7 +285,7 @@ class ScrollSpy {
}
_clear() {
- makeArray(SelectorEngine.find(this._selector))
+ SelectorEngine.find(this._selector)
.filter(node => node.classList.contains(CLASS_NAME_ACTIVE))
.forEach(node => node.classList.remove(CLASS_NAME_ACTIVE))
}
@@ -324,7 +323,7 @@ class ScrollSpy {
*/
EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
- makeArray(SelectorEngine.find(SELECTOR_DATA_SPY))
+ SelectorEngine.find(SELECTOR_DATA_SPY)
.forEach(spy => new ScrollSpy(spy, Manipulator.getDataAttributes(spy)))
})