mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-07 04:54: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() {
|
_getPopperConfig() {
|
||||||
let popperConfig = {
|
const popperConfig = {
|
||||||
placement: this._getPlacement(),
|
placement: this._getPlacement(),
|
||||||
modifiers: {
|
modifiers: {
|
||||||
offset: this._getOffset(),
|
offset: this._getOffset(),
|
||||||
@ -361,14 +361,10 @@ class Dropdown {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.popperConfig) {
|
return {
|
||||||
popperConfig = {
|
...popperConfig,
|
||||||
...popperConfig,
|
...this._config.popperConfig
|
||||||
...this._config.popperConfig
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return popperConfig
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Static
|
// Static
|
||||||
|
@ -483,15 +483,10 @@ class Tooltip {
|
|||||||
onUpdate: data => this._handlePopperPlacementChange(data)
|
onUpdate: data => this._handlePopperPlacementChange(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
let resultConfig = defaultBsConfig
|
return {
|
||||||
if (this.config.popperConfig) {
|
...defaultBsConfig,
|
||||||
resultConfig = {
|
...this.config.popperConfig
|
||||||
...defaultBsConfig,
|
|
||||||
...this.config.popperConfig
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultConfig
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_addAttachmentClass(attachment) {
|
_addAttachmentClass(attachment) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user