Skip to content

Commit e701a06

Browse files
committed
fix(gui): build the combo target list in one pass
React Doctor's js-flatmap-filter fired on the map().filter(Boolean) this lane introduced at CompactionRoutingPanel.tsx:51 -- one new warning in one file, and the job's blocking threshold is warning. flatMap does the same work in a single pass. The related js-combine-iterations rule is switched off in gui/doctor.config.json, but this is a different rule and is enabled, so this is a real new finding rather than an accepted one.
1 parent 4fc7650 commit e701a06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎gui/src/components/CompactionRoutingPanel.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function readComboProviders(payload: unknown): Map<string, string[]> {
4848
// back would return an inherited member for an alias of `constructor` or `toString`.
4949
const result = new Map<string, string[]>();
5050
for (const combo of parseComboList(payload)) {
51-
result.set(combo.model, [...new Set(combo.targets.map(target => target.provider).filter(Boolean))]);
51+
result.set(combo.model, [...new Set(combo.targets.flatMap(target => target.provider ? [target.provider] : []))]);
5252
}
5353
return result;
5454
}

0 commit comments

Comments
 (0)