mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-15 10:05:40 +02:00
Dist (#30694)
This commit is contained in:
14
js/dist/collapse.js
vendored
14
js/dist/collapse.js
vendored
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user