mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
_getDelegateConfig()
: add a comment and remove an unneeded config check
This commit is contained in:
parent
c4e189df40
commit
92c7056619
@ -685,14 +685,15 @@ class Tooltip extends BaseComponent {
|
|||||||
_getDelegateConfig() {
|
_getDelegateConfig() {
|
||||||
const config = {}
|
const config = {}
|
||||||
|
|
||||||
if (this._config) {
|
for (const key in this._config) {
|
||||||
for (const key in this._config) {
|
if (this.constructor.Default[key] !== this._config[key]) {
|
||||||
if (this.constructor.Default[key] !== this._config[key]) {
|
config[key] = this._config[key]
|
||||||
config[key] = this._config[key]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In the future can be replaced with:
|
||||||
|
// const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
|
||||||
|
// `Object.fromEntries(keysWithDifferentValues)`
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user