mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-28 15:50:01 +02:00
Add parentheses around multiple spread conditions
This commit is contained in:
@@ -329,7 +329,7 @@ class Collapse {
|
|||||||
const _config = {
|
const _config = {
|
||||||
...Default,
|
...Default,
|
||||||
...$element.data(),
|
...$element.data(),
|
||||||
...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)) {
|
||||||
|
@@ -308,7 +308,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
|
||||||
|
@@ -552,7 +552,7 @@ class Modal {
|
|||||||
const _config = {
|
const _config = {
|
||||||
...Default,
|
...Default,
|
||||||
...$(this).data(),
|
...$(this).data(),
|
||||||
...typeof config === 'object' && config ? config : {}
|
...(typeof config === 'object' && config ? config : {})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
@@ -155,7 +155,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' && Util.isElement(config.target)) {
|
if (typeof config.target !== 'string' && Util.isElement(config.target)) {
|
||||||
|
@@ -151,7 +151,7 @@ class Toast {
|
|||||||
config = {
|
config = {
|
||||||
...Default,
|
...Default,
|
||||||
...$(this._element).data(),
|
...$(this._element).data(),
|
||||||
...typeof config === 'object' && config ? config : {}
|
...(typeof config === 'object' && config ? config : {})
|
||||||
}
|
}
|
||||||
|
|
||||||
Util.typeCheckConfig(
|
Util.typeCheckConfig(
|
||||||
|
@@ -473,7 +473,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
|
||||||
@@ -657,7 +657,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') {
|
||||||
|
Reference in New Issue
Block a user