2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-15 11:59:39 +03:00

Remove useless check for null object with spread operator

This commit is contained in:
Johann-S
2019-08-14 18:02:41 +02:00
committed by XhmikosR
parent 9cee3c2808
commit a9c35b3ca8
2 changed files with 7 additions and 16 deletions
+4 -8
View File
@@ -341,7 +341,7 @@ class Dropdown {
}
_getPopperConfig() {
let popperConfig = {
const popperConfig = {
placement: this._getPlacement(),
modifiers: {
offset: this._getOffset(),
@@ -361,14 +361,10 @@ class Dropdown {
}
}
if (this._config.popperConfig) {
popperConfig = {
...popperConfig,
...this._config.popperConfig
}
return {
...popperConfig,
...this._config.popperConfig
}
return popperConfig
}
// Static
+3 -8
View File
@@ -483,15 +483,10 @@ class Tooltip {
onUpdate: data => this._handlePopperPlacementChange(data)
}
let resultConfig = defaultBsConfig
if (this.config.popperConfig) {
resultConfig = {
...defaultBsConfig,
...this.config.popperConfig
}
return {
...defaultBsConfig,
...this.config.popperConfig
}
return resultConfig
}
_addAttachmentClass(attachment) {