1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

Add parentheses around multiple spread conditions

This commit is contained in:
XhmikosR 2020-06-26 18:50:04 +03:00
parent a67231ae1c
commit 6d86b140f9
6 changed files with 7 additions and 7 deletions

View file

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

View file

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

View file

@ -544,7 +544,7 @@ class Modal {
const _config = {
...Default,
...Manipulator.getDataAttributes(this),
...typeof config === 'object' && config ? config : {}
...(typeof config === 'object' && config ? config : {})
}
if (!data) {

View file

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

View file

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

View file

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