1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-15 10:05:40 +02:00
This commit is contained in:
XhmikosR
2020-05-13 21:53:43 +03:00
committed by GitHub
parent 53eb7d3883
commit de7af5ee07
56 changed files with 3476 additions and 4263 deletions

14
js/dist/collapse.js vendored
View File

@@ -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;
}