diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-06-26 18:50:04 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-07-12 15:52:25 +0300 |
commit | 6d86b140f96049661675cfd83d219b4b82385e36 (patch) | |
tree | 6b7d5aad12ec8c71067bd623db3b28c164da039f /js/src | |
parent | a67231ae1c352c37a278ac501d7ffb91b1eb20c7 (diff) |
Add parentheses around multiple spread conditions
Diffstat (limited to 'js/src')
-rw-r--r-- | js/src/collapse.js | 2 | ||||
-rw-r--r-- | js/src/dropdown.js | 2 | ||||
-rw-r--r-- | js/src/modal.js | 2 | ||||
-rw-r--r-- | js/src/scrollspy.js | 2 | ||||
-rw-r--r-- | js/src/toast.js | 2 | ||||
-rw-r--r-- | js/src/tooltip.js | 4 |
6 files changed, 7 insertions, 7 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js index 693e7ee2c8..e569d99819 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -342,7 +342,7 @@ class Collapse { const _config = { ...Default, ...Manipulator.getDataAttributes(element), - ...typeof config === 'object' && config ? config : {} + ...(typeof config === 'object' && config ? config : {}) } if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { diff --git a/js/src/dropdown.js b/js/src/dropdown.js index 539f9e7a44..4af48cadb8 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -303,7 +303,7 @@ class Dropdown { offset.fn = data => { data.offsets = { ...data.offsets, - ...this._config.offset(data.offsets, this._element) || {} + ...(this._config.offset(data.offsets, this._element) || {}) } return data diff --git a/js/src/modal.js b/js/src/modal.js index 8c6617650d..1285793f36 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -544,7 +544,7 @@ class Modal { const _config = { ...Default, ...Manipulator.getDataAttributes(this), - ...typeof config === 'object' && config ? config : {} + ...(typeof config === 'object' && config ? config : {}) } if (!data) { diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index 6f7dd04f27..108b6f067b 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -160,7 +160,7 @@ class ScrollSpy { _getConfig(config) { config = { ...Default, - ...typeof config === 'object' && config ? config : {} + ...(typeof config === 'object' && config ? config : {}) } if (typeof config.target !== 'string' && isElement(config.target)) { diff --git a/js/src/toast.js b/js/src/toast.js index fd9976fb97..30f90c2957 100644 --- a/js/src/toast.js +++ b/js/src/toast.js @@ -170,7 +170,7 @@ class Toast { config = { ...Default, ...Manipulator.getDataAttributes(this._element), - ...typeof config === 'object' && config ? config : {} + ...(typeof config === 'object' && config ? config : {}) } typeCheckConfig(NAME, config, this.constructor.DefaultType) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index d8d92f57d1..9ad73328be 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -491,7 +491,7 @@ class Tooltip { offset.fn = data => { data.offsets = { ...data.offsets, - ...this.config.offset(data.offsets, this.element) || {} + ...(this.config.offset(data.offsets, this.element) || {}) } return data @@ -689,7 +689,7 @@ class Tooltip { config = { ...this.constructor.Default, ...dataAttributes, - ...typeof config === 'object' && config ? config : {} + ...(typeof config === 'object' && config ? config : {}) } if (typeof config.delay === 'number') { |