From 1ec12bfd5da382bfbf431abf3f45eb59d9bdc0bd Mon Sep 17 00:00:00 2001 From: Bojiang Date: Sat, 26 Jul 2025 10:31:33 +0800 Subject: [PATCH] jiangbo91@huawei.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit code 规则 Signed-off-by: Bojiang --- src/util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util.js b/src/util.js index c8e9eb0..9b260d5 100644 --- a/src/util.js +++ b/src/util.js @@ -412,10 +412,10 @@ function checkModuleIsVaild(requireStatementExec, resourcePath) { if (fs.existsSync(json5Path)) { const json5Content = fs.readFileSync(json5Path, 'utf8'); const content = JSON5.parse(json5Content); - if (content['dependencies']) { - Object.keys(content['dependencies']).forEach(element =>{ + if (content.dependencies) { + Object.keys(content.dependencies).forEach(element =>{ dependencies.push(element); - }) + }); } } -- Gitee