mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
Add parentheses around multiple spread conditions
This commit is contained in:
parent
a67231ae1c
commit
6d86b140f9
@ -342,7 +342,7 @@ class Collapse {
|
|||||||
const _config = {
|
const _config = {
|
||||||
...Default,
|
...Default,
|
||||||
...Manipulator.getDataAttributes(element),
|
...Manipulator.getDataAttributes(element),
|
||||||
...typeof config === 'object' && config ? config : {}
|
...(typeof config === 'object' && config ? config : {})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
||||||
|
@ -303,7 +303,7 @@ class Dropdown {
|
|||||||
offset.fn = data => {
|
offset.fn = data => {
|
||||||
data.offsets = {
|
data.offsets = {
|
||||||
...data.offsets,
|
...data.offsets,
|
||||||
...this._config.offset(data.offsets, this._element) || {}
|
...(this._config.offset(data.offsets, this._element) || {})
|
||||||
}
|
}
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
@ -544,7 +544,7 @@ class Modal {
|
|||||||
const _config = {
|
const _config = {
|
||||||
...Default,
|
...Default,
|
||||||
...Manipulator.getDataAttributes(this),
|
...Manipulator.getDataAttributes(this),
|
||||||
...typeof config === 'object' && config ? config : {}
|
...(typeof config === 'object' && config ? config : {})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
@ -160,7 +160,7 @@ class ScrollSpy {
|
|||||||
_getConfig(config) {
|
_getConfig(config) {
|
||||||
config = {
|
config = {
|
||||||
...Default,
|
...Default,
|
||||||
...typeof config === 'object' && config ? config : {}
|
...(typeof config === 'object' && config ? config : {})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof config.target !== 'string' && isElement(config.target)) {
|
if (typeof config.target !== 'string' && isElement(config.target)) {
|
||||||
|
@ -170,7 +170,7 @@ class Toast {
|
|||||||
config = {
|
config = {
|
||||||
...Default,
|
...Default,
|
||||||
...Manipulator.getDataAttributes(this._element),
|
...Manipulator.getDataAttributes(this._element),
|
||||||
...typeof config === 'object' && config ? config : {}
|
...(typeof config === 'object' && config ? config : {})
|
||||||
}
|
}
|
||||||
|
|
||||||
typeCheckConfig(NAME, config, this.constructor.DefaultType)
|
typeCheckConfig(NAME, config, this.constructor.DefaultType)
|
||||||
|
@ -491,7 +491,7 @@ class Tooltip {
|
|||||||
offset.fn = data => {
|
offset.fn = data => {
|
||||||
data.offsets = {
|
data.offsets = {
|
||||||
...data.offsets,
|
...data.offsets,
|
||||||
...this.config.offset(data.offsets, this.element) || {}
|
...(this.config.offset(data.offsets, this.element) || {})
|
||||||
}
|
}
|
||||||
|
|
||||||
return data
|
return data
|
||||||
@ -689,7 +689,7 @@ class Tooltip {
|
|||||||
config = {
|
config = {
|
||||||
...this.constructor.Default,
|
...this.constructor.Default,
|
||||||
...dataAttributes,
|
...dataAttributes,
|
||||||
...typeof config === 'object' && config ? config : {}
|
...(typeof config === 'object' && config ? config : {})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof config.delay === 'number') {
|
if (typeof config.delay === 'number') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user