aboutsummaryrefslogtreecommitdiff
path: root/js/src/tooltip.js
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2017-11-13 11:25:36 +0100
committerGitHub <[email protected]>2017-11-13 11:25:36 +0100
commit9a0bba9afa039308e84442a2b329bf64f5678a00 (patch)
tree0b4216889b0b675407b85d74692d8505ecfd0c82 /js/src/tooltip.js
parent1354a929f911bfb8bf3a9b22c0f79fc0277c3a74 (diff)
downloadbootstrap-9a0bba9afa039308e84442a2b329bf64f5678a00.tar.xz
bootstrap-9a0bba9afa039308e84442a2b329bf64f5678a00.zip
Object spread : less jQuery more ES6 (#24665)
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r--js/src/tooltip.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 7cefd0be6..002dea429 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -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 = {