mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-15 11:59:39 +03:00
Exempt getUID() from ESLint's no-bitwise rule
[skip sauce] [skip validator]
This commit is contained in:
@@ -99,7 +99,9 @@ const Util = (($) => {
|
||||
|
||||
getUID(prefix) {
|
||||
do {
|
||||
/* eslint-disable no-bitwise */
|
||||
prefix += ~~(Math.random() * 1000000) // "~~" acts like a faster Math.floor() here
|
||||
/* eslint-enable no-bitwise */
|
||||
} while (document.getElementById(prefix))
|
||||
return prefix
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user