aboutsummaryrefslogtreecommitdiff
path: root/js/src/util.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2016-06-02 21:48:53 -0700
committerMark Otto <[email protected]>2016-06-02 21:48:53 -0700
commit8feae9075ae55be4e6cd0e884fbfa006a6639ceb (patch)
tree0124594afc748b650fbe2f840b1e8d4cabc841cf /js/src/util.js
parent96835e1512631a1a54e99e1179e06d2e23060705 (diff)
parent0b4187d37b8fb1a65a5929329b51b04a2d6aa1eb (diff)
downloadbootstrap-8feae9075ae55be4e6cd0e884fbfa006a6639ceb.tar.xz
bootstrap-8feae9075ae55be4e6cd0e884fbfa006a6639ceb.zip
Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev
Diffstat (limited to 'js/src/util.js')
-rw-r--r--js/src/util.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/src/util.js b/js/src/util.js
index dba6e9bd6..b779c448f 100644
--- a/js/src/util.js
+++ b/js/src/util.js
@@ -16,6 +16,8 @@ const Util = (($) => {
let transition = false
+ const MAX_UID = 1000000
+
const TransitionEndEvent = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
@@ -40,6 +42,7 @@ const Util = (($) => {
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments)
}
+ 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