diff options
Diffstat (limited to 'js/src/util.js')
| -rw-r--r-- | js/src/util.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/src/util.js b/js/src/util.js index dba6e9bd6..070c5ea75 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', @@ -100,7 +102,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 |
