aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2020-06-26 18:50:04 +0300
committerXhmikosR <[email protected]>2020-07-12 15:52:25 +0300
commit6d86b140f96049661675cfd83d219b4b82385e36 (patch)
tree6b7d5aad12ec8c71067bd623db3b28c164da039f /js/src
parenta67231ae1c352c37a278ac501d7ffb91b1eb20c7 (diff)
downloadbootstrap-6d86b140f96049661675cfd83d219b4b82385e36.tar.xz
bootstrap-6d86b140f96049661675cfd83d219b4b82385e36.zip
Add parentheses around multiple spread conditions
Diffstat (limited to 'js/src')
-rw-r--r--js/src/collapse.js2
-rw-r--r--js/src/dropdown.js2
-rw-r--r--js/src/modal.js2
-rw-r--r--js/src/scrollspy.js2
-rw-r--r--js/src/toast.js2
-rw-r--r--js/src/tooltip.js4
6 files changed, 7 insertions, 7 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js
index 693e7ee2c..e569d9981 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 539f9e7a4..4af48cadb 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 8c6617650..1285793f3 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 6f7dd04f2..108b6f067 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 fd9976fb9..30f90c295 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 d8d92f57d..9ad73328b 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') {