diff --git a/shared/pubUtils/util.ts b/shared/pubUtils/util.ts index 9869fc3a3..5beaa41f6 100644 --- a/shared/pubUtils/util.ts +++ b/shared/pubUtils/util.ts @@ -226,8 +226,8 @@ export function getRandEelmWithWeight(randomList: * @param source */ export function sortArrRandom(source: T[] = []): T[] { - let arr: T[] = deepCopy(source); - return arr.sort(() => { return Math.random() - 0.5; }); + let newArr: T[] = [...source]; + return newArr.sort(() => { return Math.random() - 0.5; }); } /**