mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
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:
1 parent
dfe52df7bb
commit
74bd19c063
1 file changed
+4
-9
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user