diff options
Diffstat (limited to 'js/src/util.js')
| -rw-r--r-- | js/src/util.js | 5 |
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 |
