aboutsummaryrefslogtreecommitdiff
path: root/js/dist/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/dist/util.js')
-rw-r--r--js/dist/util.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/dist/util.js b/js/dist/util.js
index 886f69d75..5c99cef75 100644
--- a/js/dist/util.js
+++ b/js/dist/util.js
@@ -17,6 +17,8 @@ var Util = (function ($) {
var transition = false;
+ var MAX_UID = 1000000;
+
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
@@ -39,8 +41,9 @@ var Util = (function ($) {
delegateType: transition.end,
handle: function 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;
}
};
}
@@ -102,7 +105,7 @@ var Util = (function ($) {
getUID: function 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;