diff options
| author | Mark Otto <[email protected]> | 2016-10-16 19:46:47 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-10-16 19:46:47 -0700 |
| commit | b4cdccba84f7681e2911d307828c5ce94c856736 (patch) | |
| tree | f8e1edddbd941adb255766889019248ffa399d0a /js/src/util.js | |
| parent | 05bdecd0b09a007ae949f49fdff9006650c06969 (diff) | |
| parent | 6d6538fc81ebdb9e29ca5a5a4e8e5768b9358fe9 (diff) | |
| download | bootstrap-b4cdccba84f7681e2911d307828c5ce94c856736.tar.xz bootstrap-b4cdccba84f7681e2911d307828c5ce94c856736.zip | |
Merge branch 'v4-dev' into v4-navbars
Diffstat (limited to 'js/src/util.js')
| -rw-r--r-- | js/src/util.js | 9 |
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 |
