mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Add parentheses around multiple spread conditions
This commit is contained in:
parent
b31046aab3
commit
31eb108811
@ -329,7 +329,7 @@ class Collapse {
|
||||
const _config = {
|
||||
...Default,
|
||||
...$element.data(),
|
||||
...typeof config === 'object' && config ? config : {}
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
||||
|
@ -308,7 +308,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
|
||||
|
@ -552,7 +552,7 @@ class Modal {
|
||||
const _config = {
|
||||
...Default,
|
||||
...$(this).data(),
|
||||
...typeof config === 'object' && config ? config : {}
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
|
@ -155,7 +155,7 @@ class ScrollSpy {
|
||||
_getConfig(config) {
|
||||
config = {
|
||||
...Default,
|
||||
...typeof config === 'object' && config ? config : {}
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
if (typeof config.target !== 'string' && Util.isElement(config.target)) {
|
||||
|
@ -151,7 +151,7 @@ class Toast {
|
||||
config = {
|
||||
...Default,
|
||||
...$(this._element).data(),
|
||||
...typeof config === 'object' && config ? config : {}
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
Util.typeCheckConfig(
|
||||
|
@ -473,7 +473,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
|
||||
@ -657,7 +657,7 @@ class Tooltip {
|
||||
config = {
|
||||
...this.constructor.Default,
|
||||
...dataAttributes,
|
||||
...typeof config === 'object' && config ? config : {}
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
if (typeof config.delay === 'number') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user