From a1a08109cd1cc3a56dc39599ad06a9edbfc08c2f Mon Sep 17 00:00:00 2001 From: Balearica Date: Fri, 23 Feb 2024 19:29:07 -0800 Subject: [PATCH] Fixed bug with auto-rotate per #892 --- src/worker-script/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker-script/index.js b/src/worker-script/index.js index 8dbe58383..40119606d 100644 --- a/src/worker-script/index.js +++ b/src/worker-script/index.js @@ -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)); }