mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 19:31:35 +02:00
Switch to Set#has()
This commit is contained in:
@@ -125,17 +125,17 @@ const getConfigByPluginKey = pluginKey => {
|
||||
}
|
||||
}
|
||||
|
||||
const utilObjects = [
|
||||
const utilObjects = new Set([
|
||||
'Util',
|
||||
'Sanitizer'
|
||||
]
|
||||
])
|
||||
|
||||
const domObjects = [
|
||||
const domObjects = new Set([
|
||||
'Data',
|
||||
'EventHandler',
|
||||
'Manipulator',
|
||||
'SelectorEngine'
|
||||
]
|
||||
])
|
||||
|
||||
const build = async plugin => {
|
||||
console.log(`Building ${plugin} plugin...`)
|
||||
@@ -144,11 +144,11 @@ const build = async plugin => {
|
||||
const pluginFilename = path.basename(bsPlugins[plugin])
|
||||
let pluginPath = rootPath
|
||||
|
||||
if (utilObjects.includes(plugin)) {
|
||||
if (utilObjects.has(plugin)) {
|
||||
pluginPath = `${rootPath}/util/`
|
||||
}
|
||||
|
||||
if (domObjects.includes(plugin)) {
|
||||
if (domObjects.has(plugin)) {
|
||||
pluginPath = `${rootPath}/dom/`
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user