Skip to content

Commit

Permalink
Fixed bug with auto-rotate per #892 (#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
Balearica committed Feb 24, 2024
1 parent dcb016a commit 8929b33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/worker-script/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ const recognize = async ({
// Therefore, if this is not the mode specified by the user, it is enabled temporarily here
const psmInit = api.GetPageSegMode();
let psmEdit = false;
if (![PSM.AUTO, PSM.AUTO_ONLY, PSM.OSD].includes(psmInit)) {
if (![PSM.AUTO, PSM.AUTO_ONLY, PSM.OSD].includes(String(psmInit))) {
psmEdit = true;
api.SetVariable('tessedit_pageseg_mode', String(PSM.AUTO));
}
Expand Down

0 comments on commit 8929b33

Please sign in to comment.