1
0
Fork 0

chore(shared): Linter issues

This commit is contained in:
Joost De Cock 2023-09-01 19:14:03 +02:00
parent 2d753aa0ef
commit d09c7b29f1
3 changed files with 2 additions and 72 deletions

View file

@ -453,6 +453,6 @@ const dec2hex = (dec) => dec.toString(16).padStart(2, '0')
export const randomString = (len = 42) => {
if (typeof window === 'undefined') return '' // Not used in SSR
const arr = new Uint8Array(len / 2)
window.crypto.getRandomValues(arr)
window.crypto.getRandomValues(arr) // eslint-disable-line
return Array.from(arr, dec2hex).join('')
}