fix random ShortId

This commit is contained in:
Alireza Ahmadi
2024-07-23 17:26:50 +02:00
parent 89b85f818d
commit c518bf5a86
+7 -7
View File
@@ -36,13 +36,13 @@ const RandomUtil = {
}, },
randomShortId(): string[] { randomShortId(): string[] {
let shortIds = new Array(24).fill('') let shortIds = new Array(24).fill('')
for (var ii = 0; ii < 24; ii++) { for (var ii = 1; ii < 24; ii++) {
for (var jj = 0; jj < this.randomInt(8); jj++){ for (var jj = 0; jj <= this.randomInt(7); jj++){
let randomNum = this.randomInt(256) let randomNum = this.randomInt(256)
shortIds[ii] += ('0' + randomNum.toString(16)).slice(-2) shortIds[ii] += ('0' + randomNum.toString(16)).slice(-2)
} }
} }
return shortIds return shortIds
} }
} }