Remove redundant recommended-dependency duplicate guard

Address review feedback: modsByName is built from annotatedMods so the
advisories array always exists, and each source mod is iterated once with
no duplicate dependencies, so the existence check can never fail. Push the
recommended_dependency advisory directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G8b9dEaJtpvydzz4ttM7JH
This commit is contained in:
Loi NguyenandClaude Opus 4.8 committed 2026-07-26 17:26:17 +07:00
1 parent dfe52df7bb
commit 74bd19c063
1 file changed
+4 -9
+4 -9
View File
@@ -122,15 +122,10 @@ export function applyModRecordAdvisories(
continue;
}
if (!targetMod.advisories.some(
advisory => advisory.type === "recommended_dependency"
&& advisory.sourceModName === sourceMod.name
)) {
targetMod.advisories.push({
type: "recommended_dependency",
sourceModName: sourceMod.name,
});
}
targetMod.advisories.push({
type: "recommended_dependency",
sourceModName: sourceMod.name,
});
}
}