From 5cad4c7e79d6a92425fa0b3a28a6884e6deaa5ab Mon Sep 17 00:00:00 2001 From: Sergiy Korzh Date: Sun, 22 Oct 2023 10:34:23 +0300 Subject: [PATCH] Fix randomizer --- easydata.js/packs/core/src/utils/utils.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/easydata.js/packs/core/src/utils/utils.ts b/easydata.js/packs/core/src/utils/utils.ts index 8cbff17a..99cedb16 100644 --- a/easydata.js/packs/core/src/utils/utils.ts +++ b/easydata.js/packs/core/src/utils/utils.ts @@ -352,9 +352,8 @@ export namespace utils { //adding 2 random symbols var randValue = strf.repeatString(' ', 2); - const maxSymbolIndex = symbols.length - 1; - randValue = replaceAtString(randValue, 0, symbols[getRandomInt(0, maxSymbolIndex)]); - randValue = replaceAtString(randValue, 1, symbols[getRandomInt(0, maxSymbolIndex)]); + randValue = replaceAtString(randValue, 0, symbols[getRandomInt(0, symbols.length)]); + randValue = replaceAtString(randValue, 1, symbols[getRandomInt(0, symbols.length)]); //generating main ID part (64-base representation of the current value of the time ticks) let ticksNum64 = intToNum36(getNowTicks() - magicTicks);