mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-20 04:47:42 +00:00
change(web): address review comments
This commit is contained in:
parent
ceabe5a041
commit
6920b3350d
1 changed files with 6 additions and 4 deletions
|
|
@ -657,12 +657,14 @@ export async function *getBestMatches(searchModules: SearchQuotientNode[], timer
|
|||
do {
|
||||
const entry: SearchResult = timer.time(() => {
|
||||
if((priorResultsQueue.peek()?.totalCost ?? Number.POSITIVE_INFINITY) < spaceQueue.peek().currentCost) {
|
||||
return priorResultsQueue.dequeue();
|
||||
const result = priorResultsQueue.dequeue();
|
||||
currentReturns[result.node.resultKey] = result.node;
|
||||
return result;
|
||||
}
|
||||
|
||||
let bestQueue = spaceQueue.dequeue();
|
||||
let newResult: PathResult = bestQueue.handleNextNode();
|
||||
spaceQueue.enqueue(bestQueue);
|
||||
let lowestCostSource = spaceQueue.dequeue();
|
||||
let newResult: PathResult = lowestCostSource.handleNextNode();
|
||||
spaceQueue.enqueue(lowestCostSource);
|
||||
|
||||
if(newResult.type == 'none') {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue