0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

_getDelegateConfig(): add a comment and remove an unneeded config check

This commit is contained in:
GeoSot 2021-06-10 10:52:35 +03:00 committed by XhmikosR
parent c4e189df40
commit 92c7056619

View File

@ -685,14 +685,15 @@ class Tooltip extends BaseComponent {
_getDelegateConfig() {
const config = {}
if (this._config) {
for (const key in this._config) {
if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this._config[key]
}
for (const key in this._config) {
if (this.constructor.Default[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
}