mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-04-27 07:24:43 +00:00
_getDelegateConfig(): add a comment and remove an unneeded config check
This commit is contained in:
parent
c4e189df40
commit
92c7056619
1 changed files with 6 additions and 5 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue