mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-29 21:52:22 +01:00
Exempt getUID() from ESLint's no-bitwise rule
[skip sauce] [skip validator]
This commit is contained in:
parent
56a6d964e0
commit
ad4c0ee52f
@ -99,7 +99,9 @@ const Util = (($) => {
|
|||||||
|
|
||||||
getUID(prefix) {
|
getUID(prefix) {
|
||||||
do {
|
do {
|
||||||
|
/* eslint-disable no-bitwise */
|
||||||
prefix += ~~(Math.random() * 1000000) // "~~" acts like a faster Math.floor() here
|
prefix += ~~(Math.random() * 1000000) // "~~" acts like a faster Math.floor() here
|
||||||
|
/* eslint-enable no-bitwise */
|
||||||
} while (document.getElementById(prefix))
|
} while (document.getElementById(prefix))
|
||||||
return prefix
|
return prefix
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user