From 92c7056619293a581626c37ef2c0095c6f1abceb Mon Sep 17 00:00:00 2001 From: GeoSot Date: Thu, 10 Jun 2021 10:52:35 +0300 Subject: [PATCH] `_getDelegateConfig()`: add a comment and remove an unneeded config check --- js/src/tooltip.js | 11 ++++++----- 1 file 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 }