Fix issue with not returning best result
This commit is contained in:
parent
b76e031352
commit
7a3ca3a302
@ -62,10 +62,10 @@ class Buckets {
|
||||
best = result;
|
||||
return
|
||||
}
|
||||
if (best.length == result.length) {
|
||||
if (best[0].length == result[0].length) {
|
||||
best.push(result);
|
||||
}
|
||||
if (best.length > result.length) {
|
||||
if (best[0].length > result[0].length) {
|
||||
best = result;
|
||||
}
|
||||
})
|
||||
@ -92,6 +92,7 @@ class Buckets {
|
||||
const action = possibleActions[i];
|
||||
|
||||
if (result.hasTarget(target)) {
|
||||
debugger
|
||||
state.matching.add(result.string());
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user