diff options
author | Mark Otto <markdotto@gmail.com> | 2018-04-30 08:22:04 +0300 |
---|---|---|
committer | Mark Otto <markdotto@gmail.com> | 2018-04-30 08:22:04 +0300 |
commit | 496311bf97deae799b7a1101893db135f3ce7ec7 (patch) | |
tree | 64f3d90819f7a7bfcbc2ec1979a94b4cedc1f66f /dist/js/bootstrap.js | |
parent | 139e89235f7c768d42ac1148b75a9f8e45ead917 (diff) |
dist
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) * -------------------------------------------------------------------------- */ |