diff options
Diffstat (limited to 'js/dist/util.js')
-rw-r--r-- | js/dist/util.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/js/dist/util.js b/js/dist/util.js index b6d5f03e91..0cb4b614e0 100644 --- a/js/dist/util.js +++ b/js/dist/util.js @@ -1,3 +1,5 @@ +'use strict'; + /** * -------------------------------------------------------------------------- * Bootstrap (v4.0.0-beta): util.js @@ -5,7 +7,7 @@ * -------------------------------------------------------------------------- */ -var Util = function ($) { +var Util = function () { /** * ------------------------------------------------------------------------ @@ -40,7 +42,7 @@ var Util = function ($) { if ($(event.target).is(this)) { return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params } - return undefined; + return undefined; // eslint-disable-line no-undefined } }; } @@ -53,7 +55,7 @@ var Util = function ($) { var el = document.createElement('bootstrap'); for (var name in TransitionEndEvent) { - if (el.style[name] !== undefined) { + if (typeof el.style[name] !== 'undefined') { return { end: TransitionEndEvent[name] }; @@ -115,7 +117,7 @@ var Util = function ($) { } try { - var $selector = $(selector); + var $selector = $(document).find(selector); return $selector.length > 0 ? selector : null; } catch (error) { return null; @@ -132,7 +134,7 @@ var Util = function ($) { }, typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { for (var property in configTypes) { - if (configTypes.hasOwnProperty(property)) { + if (Object.prototype.hasOwnProperty.call(configTypes, property)) { var expectedTypes = configTypes[property]; var value = config[property]; var valueType = value && isElement(value) ? 'element' : toType(value); |