1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 05:19:15 +02:00

Object spread : less jQuery more ES6 (#24665)

This commit is contained in:
Johann-S
2017-11-13 11:25:36 +01:00
committed by GitHub
parent 1354a929f9
commit 9a0bba9afa
9 changed files with 85 additions and 51 deletions

View File

@@ -501,10 +501,13 @@ const Tooltip = (($) => {
})
if (this.config.selector) {
this.config = $.extend({}, this.config, {
trigger : 'manual',
selector : ''
})
this.config = {
...this.config,
...{
trigger : 'manual',
selector : ''
}
}
} else {
this._fixTitle()
}
@@ -613,12 +616,11 @@ const Tooltip = (($) => {
}
_getConfig(config) {
config = $.extend(
{},
this.constructor.Default,
$(this.element).data(),
config
)
config = {
...this.constructor.Default,
...$(this.element).data(),
...config
}
if (typeof config.delay === 'number') {
config.delay = {