diff options
| author | XhmikosR <[email protected]> | 2017-09-26 17:46:16 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-09-26 17:46:16 +0300 |
| commit | c090c79a709a84cb6e2bd5dbed6343ae49c861a1 (patch) | |
| tree | cadb5d1e7a94588047081bb8d8c4f92914aaf043 /js/src/util.js | |
| parent | 8e56145e45e9d58e23c5f339b6cac50e751e36a7 (diff) | |
| parent | 3eae92f1fec3c84acf38bd7e16a14eac48868334 (diff) | |
| download | bootstrap-c090c79a709a84cb6e2bd5dbed6343ae49c861a1.tar.xz bootstrap-c090c79a709a84cb6e2bd5dbed6343ae49c861a1.zip | |
Merge branch 'v4-dev' into btn-active
Diffstat (limited to 'js/src/util.js')
| -rw-r--r-- | js/src/util.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/src/util.js b/js/src/util.js index b18d0f776..7eb25de55 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -32,10 +32,6 @@ const Util = (() => { return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase() } - function isElement(obj) { - return (obj[0] || obj).nodeType - } - function getSpecialTransitionEndEvent() { return { bindType: transition.end, @@ -138,12 +134,16 @@ const Util = (() => { return Boolean(transition) }, + isElement(obj) { + return (obj[0] || obj).nodeType + }, + typeCheckConfig(componentName, config, configTypes) { for (const property in configTypes) { if (Object.prototype.hasOwnProperty.call(configTypes, property)) { const expectedTypes = configTypes[property] const value = config[property] - const valueType = value && isElement(value) ? + const valueType = value && Util.isElement(value) ? 'element' : toType(value) if (!new RegExp(expectedTypes).test(valueType)) { |
