aboutsummaryrefslogtreecommitdiff
path: root/js/src/dropdown.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/dropdown.js
parent1354a929f911bfb8bf3a9b22c0f79fc0277c3a74 (diff)
downloadbootstrap-9a0bba9afa039308e84442a2b329bf64f5678a00.tar.xz
bootstrap-9a0bba9afa039308e84442a2b329bf64f5678a00.zip
Object spread : less jQuery more ES6 (#24665)
Diffstat (limited to 'js/src/dropdown.js')
-rw-r--r--js/src/dropdown.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index 57ee10ebd..8affedc6c 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -210,12 +210,11 @@ const Dropdown = (($) => {
}
_getConfig(config) {
- config = $.extend(
- {},
- this.constructor.Default,
- $(this._element).data(),
- config
- )
+ config = {
+ ...this.constructor.Default,
+ ...$(this._element).data(),
+ ...config
+ }
Util.typeCheckConfig(
NAME,
@@ -262,7 +261,10 @@ const Dropdown = (($) => {
const offsetConf = {}
if (typeof this._config.offset === 'function') {
offsetConf.fn = (data) => {
- data.offsets = $.extend({}, data.offsets, this._config.offset(data.offsets) || {})
+ data.offsets = {
+ ...data.offsets,
+ ...this._config.offset(data.offsets) || {}
+ }
return data
}
} else {