mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 03:26:07 +00:00
fix: the four reliability findings Sonar reports on dev
- The warmed fonts' key sorts by code units, so the same faces give the same key in every locale. - The nearest weight of a snapshot face starts from the first face it has. - The round hike search names its candidates with their place in the list explicitly instead of handing map a function of two arguments.
This commit is contained in:
@@ -64,14 +64,15 @@ export async function findRoundHikes(
|
||||
): Promise<void> {
|
||||
const state = await searchRoundLoops(request.start, request.targetM, (spots) => askLoop(request, spots, signal), {
|
||||
signal,
|
||||
onStep: ({ found, asked }) => report({ phase: 'searching', candidates: found.map(candidateOf), asked }),
|
||||
onStep: ({ found, asked }) =>
|
||||
report({ phase: 'searching', candidates: found.map((loop, i) => candidateOf(loop, i)), asked }),
|
||||
});
|
||||
if (signal.aborted) return;
|
||||
if (state.answered === 0) {
|
||||
report({ phase: 'failed', candidates: [], asked: state.asked });
|
||||
return;
|
||||
}
|
||||
const found = state.found.map(candidateOf);
|
||||
const found = state.found.map((loop, i) => candidateOf(loop, i));
|
||||
let candidates = [...found];
|
||||
report({ phase: 'done', candidates, asked: state.asked });
|
||||
for (const round of found) {
|
||||
|
||||
Reference in New Issue
Block a user