mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
Remove useless check for null object with spread operator
This commit is contained in:
parent
9cee3c2808
commit
a9c35b3ca8
@ -341,7 +341,7 @@ class Dropdown {
|
||||
}
|
||||
|
||||
_getPopperConfig() {
|
||||
let popperConfig = {
|
||||
const popperConfig = {
|
||||
placement: this._getPlacement(),
|
||||
modifiers: {
|
||||
offset: this._getOffset(),
|
||||
@ -361,16 +361,12 @@ class Dropdown {
|
||||
}
|
||||
}
|
||||
|
||||
if (this._config.popperConfig) {
|
||||
popperConfig = {
|
||||
return {
|
||||
...popperConfig,
|
||||
...this._config.popperConfig
|
||||
}
|
||||
}
|
||||
|
||||
return popperConfig
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static dropdownInterface(element, config) {
|
||||
|
@ -483,17 +483,12 @@ class Tooltip {
|
||||
onUpdate: data => this._handlePopperPlacementChange(data)
|
||||
}
|
||||
|
||||
let resultConfig = defaultBsConfig
|
||||
if (this.config.popperConfig) {
|
||||
resultConfig = {
|
||||
return {
|
||||
...defaultBsConfig,
|
||||
...this.config.popperConfig
|
||||
}
|
||||
}
|
||||
|
||||
return resultConfig
|
||||
}
|
||||
|
||||
_addAttachmentClass(attachment) {
|
||||
this.getTipElement().classList.add(`${CLASS_PREFIX}-${attachment}`)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user