diff options
| author | Mark Otto <[email protected]> | 2016-07-23 21:05:18 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-07-23 21:05:18 -0700 |
| commit | 7fd00263e35f891bfc792f9dd12c17a5025cd93c (patch) | |
| tree | 28d07418fb7abfacccb317b501937e02ffccf096 /js/src/util.js | |
| parent | d4457b33032d2540a4a3b7fa600f22055ce2000d (diff) | |
| parent | 38312640df9c4b84a47e62d7dfeb16b25049aafb (diff) | |
| download | bootstrap-7fd00263e35f891bfc792f9dd12c17a5025cd93c.tar.xz bootstrap-7fd00263e35f891bfc792f9dd12c17a5025cd93c.zip | |
Merge branch 'v4-dev' into v4-navbars
Diffstat (limited to 'js/src/util.js')
| -rw-r--r-- | js/src/util.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/src/util.js b/js/src/util.js index dba6e9bd6..86d9fe1f4 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', @@ -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 |
