From fa847e7166ab4983123d9c24776602ac30aba831 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 4 Sep 2024 12:05:03 +0800 Subject: [PATCH] fix(utils): wrong auto fix for getAcwScV2ByArg1 --- lib/routes/5eplay/utils.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/routes/5eplay/utils.ts b/lib/routes/5eplay/utils.ts index d14c5b56db..1e50b25fd1 100644 --- a/lib/routes/5eplay/utils.ts +++ b/lib/routes/5eplay/utils.ts @@ -13,10 +13,12 @@ const getAcwScV2ByArg1 = (arg1) => { } return res; }; - const unsbox = function (str) { + const unsbox = function (str: string) { const code = [15, 35, 29, 24, 33, 16, 1, 38, 10, 9, 19, 31, 40, 27, 22, 23, 25, 13, 6, 11, 39, 18, 20, 8, 14, 21, 32, 26, 2, 30, 7, 4, 17, 5, 3, 28, 34, 37, 12, 36]; - const res = []; - for (const [i, cur] of str.entries()) { + const res: string[] = []; + // eslint-disable-next-line unicorn/no-for-loop + for (let i = 0; i < str.length; i++) { + const cur = str[i]; for (const [j, element] of code.entries()) { if (element === i + 1) { res[j] = cur;