Skip to content

Commit 452dd9a

Browse files
committed
fix: 修复全局规则更改未记录
1 parent 83f347c commit 452dd9a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/file.ts

+9-5
Original file line numberDiff line numberDiff line change
@@ -534,13 +534,17 @@ export const updateReadMeMd = async (
534534
oldConfig.globalGroups,
535535
newConfig.globalGroups,
536536
);
537-
if (
537+
538+
// 计算全局差异的数量
539+
const globalDiffCount =
538540
globalDiffLog.addGlobalGroups.length +
539-
globalDiffLog.changeGlobalGroups.length +
540-
globalDiffLog.removeGlobalGroups.length >
541-
0
542-
) {
541+
globalDiffLog.changeGlobalGroups.length +
542+
globalDiffLog.removeGlobalGroups.length;
543+
544+
// 如果全局差异的数量大于 0,则将其添加到 globaldiffs 中,并增加 changeCount
545+
if (globalDiffCount > 0) {
543546
globaldiffs.push({ ...globalDiffLog });
547+
changeCount += globalDiffCount;
544548
}
545549

546550
// 遍历新配置中的每个应用程序

0 commit comments

Comments
 (0)