2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-30 15:24:08 +03: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
+6 -5
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
}