mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-27 13:59:06 +02:00
Switch to Set#has()
This commit is contained in:
@@ -39,7 +39,7 @@ const DATA_KEY = 'bs.tooltip'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const CLASS_PREFIX = 'bs-tooltip'
|
||||
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
|
||||
const DISALLOWED_ATTRIBUTES = ['sanitize', 'allowList', 'sanitizeFn']
|
||||
const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])
|
||||
|
||||
const DefaultType = {
|
||||
animation: 'boolean',
|
||||
@@ -679,7 +679,7 @@ class Tooltip {
|
||||
const dataAttributes = Manipulator.getDataAttributes(this.element)
|
||||
|
||||
Object.keys(dataAttributes).forEach(dataAttr => {
|
||||
if (DISALLOWED_ATTRIBUTES.includes(dataAttr)) {
|
||||
if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
|
||||
delete dataAttributes[dataAttr]
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user