Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <markdotto@gmail.com>2017-09-06 07:05:12 +0300
committerMark Otto <markdotto@gmail.com>2017-09-06 07:05:12 +0300
commitdf47558ef680adf6e80b5e8402837125c41210c0 (patch)
treefb9cb52d3ed467f73c16140254b18e9733e640ab /js/dist/util.js
parentfbd1f52f896c599211c24c5c86d04fbbb3e88165 (diff)
dist
Diffstat (limited to 'js/dist/util.js')
-rw-r--r--js/dist/util.js12
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);