diff options
author | GeoSot <geo.sotis@gmail.com> | 2021-06-10 10:52:35 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2021-07-22 17:20:38 +0300 |
commit | 92c7056619293a581626c37ef2c0095c6f1abceb (patch) | |
tree | 2e83ee95a618efac54028fb7591878aa1d86cfd3 /js/src/tooltip.js | |
parent | c4e189df40ffced65848d440e8e95892360445ba (diff) |
`_getDelegateConfig()`: add a comment and remove an unneeded config check
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r-- | js/src/tooltip.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index cdc9b1e5d5..d69a80e275 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -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 } |