From 3e5660e1afce5c88d35836d7299e094a51eb0bd2 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Sun, 14 Jul 2024 00:55:25 +0200 Subject: [PATCH] fix randomShortID #1338 --- web/assets/js/util/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/assets/js/util/utils.js b/web/assets/js/util/utils.js index 48f55c82..16598903 100644 --- a/web/assets/js/util/utils.js +++ b/web/assets/js/util/utils.js @@ -137,8 +137,8 @@ class RandomUtil { static randomShortId() { let shortIds = new Array(24).fill(''); - for (var ii = 0; ii < 24; ii++) { - for (var jj = 0; jj < this.randomInt(16); jj++){ + for (var ii = 1; ii < 24; ii++) { + for (var jj = 0; jj <= this.randomInt(7); jj++){ let randomNum = this.randomInt(256); shortIds[ii] += ('0' + randomNum.toString(16)).slice(-2) }