From be8ae18d24ec6552ed182358d7acd275e37dc9ac Mon Sep 17 00:00:00 2001 From: luying Date: Wed, 23 Dec 2020 17:20:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bug=20=E9=9A=8F=E6=9C=BA0=E4=BB=B6?= =?UTF-8?q?=E6=97=B6=E6=AD=BB=E5=BE=AA=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/pubUtils/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/pubUtils/util.ts b/shared/pubUtils/util.ts index 707cc0a46..b268f2a61 100644 --- a/shared/pubUtils/util.ts +++ b/shared/pubUtils/util.ts @@ -276,7 +276,7 @@ export function getRandEelm(source: Array = [], cnt = 1): Array { while(1) { let rand = Math.floor(Math.random() * source.length); idxs.add(rand); - if (idxs.size == cnt) { + if (idxs.size >= cnt) { break; } }