diff options
| author | XhmikosR <[email protected]> | 2020-05-13 21:53:43 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-13 21:53:43 +0300 |
| commit | de7af5ee0738d08ef2d6702654834beb5bfce35e (patch) | |
| tree | 371b751a7f96f96399e53d1767b8f0c4610cb268 /js/dist/collapse.js | |
| parent | 53eb7d38830f1e7c593069c8f5b40f4127563317 (diff) | |
| download | bootstrap-de7af5ee0738d08ef2d6702654834beb5bfce35e.tar.xz bootstrap-de7af5ee0738d08ef2d6702654834beb5bfce35e.zip | |
Dist (#30694)
Diffstat (limited to 'js/dist/collapse.js')
| -rw-r--r-- | js/dist/collapse.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/js/dist/collapse.js b/js/dist/collapse.js index 1620280e5..b3b47259d 100644 --- a/js/dist/collapse.js +++ b/js/dist/collapse.js @@ -358,9 +358,7 @@ var complete = function complete() { _this._element.classList.remove(CLASS_NAME_COLLAPSING); - _this._element.classList.add(CLASS_NAME_COLLAPSE); - - _this._element.classList.add(CLASS_NAME_SHOW); + _this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); _this._element.style[dimension] = ''; @@ -397,9 +395,7 @@ this._element.classList.add(CLASS_NAME_COLLAPSING); - this._element.classList.remove(CLASS_NAME_COLLAPSE); - - this._element.classList.remove(CLASS_NAME_SHOW); + this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); var triggerArrayLength = this._triggerArray.length; @@ -448,7 +444,7 @@ ; _proto._getConfig = function _getConfig(config) { - config = _objectSpread2({}, Default, {}, config); + config = _objectSpread2(_objectSpread2({}, Default), config); config.toggle = Boolean(config.toggle); // Coerce string values typeCheckConfig(NAME, config, DefaultType); @@ -506,9 +502,9 @@ Collapse.collapseInterface = function collapseInterface(element, config) { var data = Data.getData(element, DATA_KEY); - var _config = _objectSpread2({}, Default, {}, Manipulator.getDataAttributes(element), {}, typeof config === 'object' && config ? config : {}); + var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), Manipulator.getDataAttributes(element)), typeof config === 'object' && config ? config : {}); - if (!data && _config.toggle && /show|hide/.test(config)) { + if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { _config.toggle = false; } |
