From fe95c7169f056596dd6f7e8680cdd6de309d6494 Mon Sep 17 00:00:00 2001 From: luying Date: Mon, 25 Apr 2022 10:00:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=9B=E5=9B=A2=E6=B4=BB=E5=8A=A8=EF=BC=9A?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96=E9=81=93=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/pubUtils/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }); } /**