diff options
| author | Pierre-Denis Vanduynslager <[email protected]> | 2016-08-02 01:35:38 -0400 |
|---|---|---|
| committer | Pierre-Denis Vanduynslager <[email protected]> | 2016-08-02 01:35:38 -0400 |
| commit | 27cf3d675c80029ff2cea1e14903886c00119e37 (patch) | |
| tree | a84ac3a7f6759fe0be4f099c41e6c92b58999437 /js/src/util.js | |
| parent | f0c0a7533c854613eba42394631567a44d790053 (diff) | |
| parent | 8e4f3fe7b95f6bb7c9939288229ec5683364743d (diff) | |
| download | bootstrap-27cf3d675c80029ff2cea1e14903886c00119e37.tar.xz bootstrap-27cf3d675c80029ff2cea1e14903886c00119e37.zip | |
Merge remote-tracking branch 'twbs/v4-dev' into v4-dev
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..051555268 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.3): 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 |
