Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2021-06-10 10:52:35 +0300
committerXhmikosR <xhmikosr@gmail.com>2021-07-22 17:20:38 +0300
commit92c7056619293a581626c37ef2c0095c6f1abceb (patch)
tree2e83ee95a618efac54028fb7591878aa1d86cfd3 /js/src
parentc4e189df40ffced65848d440e8e95892360445ba (diff)
`_getDelegateConfig()`: add a comment and remove an unneeded config check
Diffstat (limited to 'js/src')
-rw-r--r--js/src/tooltip.js11
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
}