diff options
Diffstat (limited to 'dist/js/bootstrap.js')
-rw-r--r-- | dist/js/bootstrap.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index 546a94f851..3d37a4a9d4 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -252,9 +252,11 @@ // Public _proto.close = function close(element) { - element = element || this._element; + var rootElement = this._element; - var rootElement = this._getRootElement(element); + if (element) { + rootElement = this._getRootElement(element); + } var customEvent = this._triggerCloseEvent(rootElement); @@ -1324,7 +1326,7 @@ var $this = $$$1(this); var data = $this.data(DATA_KEY); - var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config); + var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config ? config : {}); if (!data && _config.toggle && /show|hide/.test(config)) { _config.toggle = false; @@ -2371,7 +2373,7 @@ return this.each(function () { var data = $$$1(this).data(DATA_KEY); - var _config = _objectSpread({}, Modal.Default, $$$1(this).data(), typeof config === 'object' && config); + var _config = _objectSpread({}, Default, $$$1(this).data(), typeof config === 'object' && config ? config : {}); if (!data) { data = new Modal(this, _config); @@ -2978,7 +2980,7 @@ }; _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), config); + config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), typeof config === 'object' && config ? config : {}); if (typeof config.delay === 'number') { config.delay = { @@ -3464,7 +3466,7 @@ _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default, config); + config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {}); if (typeof config.target !== 'string') { var id = $$$1(config.target).attr('id'); @@ -3885,7 +3887,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0): index.js + * Bootstrap (v4.1.0): index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ |