refactor: replace deprecated String.prototype.substr() (#2187)
This commit is contained in:
@@ -88,7 +88,7 @@ const getTokenConfiguration = async (endpoint) => {
|
||||
const generateRandomString = () => {
|
||||
const array = new Uint32Array(28)
|
||||
window.crypto.getRandomValues(array)
|
||||
return Array.from(array, (dec) => `0${dec.toString(16)}`.substr(-2)).join("")
|
||||
return Array.from(array, (dec) => `0${dec.toString(16)}`.slice(-2)).join("")
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user