aboutsummaryrefslogtreecommitdiff
path: root/js/src/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/util.js')
-rw-r--r--js/src/util.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/src/util.js b/js/src/util.js
index dba6e9bd6..d117dfcd5 100644
--- a/js/src/util.js
+++ b/js/src/util.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): util.js
+ * Bootstrap (v4.0.0-alpha.4): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -16,6 +16,8 @@ const Util = (($) => {
let transition = false
+ const MAX_UID = 1000000
+
const TransitionEndEvent = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
@@ -38,8 +40,9 @@ const Util = (($) => {
delegateType: transition.end,
handle(event) {
if ($(event.target).is(this)) {
- return event.handleObj.handler.apply(this, arguments)
+ return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params
}
+ return undefined
}
}
}
@@ -100,7 +103,7 @@ const Util = (($) => {
getUID(prefix) {
do {
/* eslint-disable no-bitwise */
- prefix += ~~(Math.random() * 1000000) // "~~" acts like a faster Math.floor() here
+ prefix += ~~(Math.random() * MAX_UID) // "~~" acts like a faster Math.floor() here
/* eslint-enable no-bitwise */
} while (document.getElementById(prefix))
return prefix