From 81d2df7fd5ef0e92b0d414eb225c58bd2e9ec11a Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Tue, 24 Sep 2024 23:54:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=86=99=E9=94=99=E4=BA=86?= =?UTF-8?q?=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/md5/md5-api.js | 2 +- plugins/md5/md5-api.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/md5/md5-api.js b/plugins/md5/md5-api.js index e9ca44d..ca7af93 100644 --- a/plugins/md5/md5-api.js +++ b/plugins/md5/md5-api.js @@ -231,7 +231,7 @@ function main() { fs = require("fs"); path = require("path"); process = require("process"); - if (!(process.argv.length > 2 && process.argv[2] === "fight")) return [3 /*break*/, 2]; + if (!("fight" in process.argv)) return [3 /*break*/, 2]; names_1 = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8"); return [4 /*yield*/, fight_only(names_1)]; case 1: diff --git a/plugins/md5/md5-api.ts b/plugins/md5/md5-api.ts index a62ae56..b276ba4 100644 --- a/plugins/md5/md5-api.ts +++ b/plugins/md5/md5-api.ts @@ -201,7 +201,7 @@ async function main() { const process = require("process"); // 读取 cli // 有 fight 参数就开启 fight_only模式 - if (process.argv.length > 2 && process.argv[2] === "fight") { + if ("fight" in process.argv) { const names = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8"); await fight_only(names); return;