1
0
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:
XhmikosR
2020-07-14 17:46:55 +03:00
parent b31046aab3
commit 31eb108811
6 changed files with 7 additions and 7 deletions

View File

@@ -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)) {

View File

@@ -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

View File

@@ -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) {

View File

@@ -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)) {

View File

@@ -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(

View File

@@ -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') {