fix: Correct logical condition for better OCR candidate selection

This commit is contained in:
Ross
2026-05-11 12:50:11 +01:00
parent 0bda5e2c41
commit c3131564e6
+2 -2
View File
@@ -987,8 +987,8 @@
const reasons = getOcrPhiReasons(text);
const isBetter = reasons.length > bestReasons.length
|| (reasons.length === bestReasons.length && text.length > bestText.length)
|| (reasons.length === bestReasons.length && text.length === bestText.length && confidence > bestConfidence);
|| (reasons.length === bestReasons.length && text.length > bestText.length)
|| (reasons.length === bestReasons.length && text.length === bestText.length && confidence > bestConfidence);
if (isBetter) {
bestText = text;