Skip to content

Conversation

@krishnamutyala06
Copy link

…dition on line 23 of getCore.js where the else if statement was checking for the same condition twice. Changed from checking if OEM is in [DEFAULT, LSTM_ONLY] to checking if it is NOT in that array (negated condition) to properly handle legacy model loading.

Fixed line 23 condition that was checking for the same OEM values twice. Changed from: } else if ([OEM.DEFAULT, OEM.LSTM_ONLY].includes(oem)) { Changed to: } else if (![OEM.DEFAULT, OEM.LSTM_ONLY].includes(oem)) {

This ensures legacy models (TESSERACT_ONLY, TESSERACT_LSTM_COMBINED) are loaded correctly when SIMD is not supported.

Fixes issue #1034

…ition on line 23 of getCore.js where the else if statement was checking for the same condition twice. Changed from checking if OEM is in [DEFAULT, LSTM_ONLY] to checking if it is NOT in that array (negated condition) to properly handle legacy model loading.

Fixed line 23 condition that was checking for the same OEM values twice.
Changed from: } else if ([OEM.DEFAULT, OEM.LSTM_ONLY].includes(oem)) {
Changed to: } else if (![OEM.DEFAULT, OEM.LSTM_ONLY].includes(oem)) {

This ensures legacy models (TESSERACT_ONLY, TESSERACT_LSTM_COMBINED) are loaded correctly when SIMD is not supported.

Fixes issue naptha#1034
@Balearica
Copy link
Member

This does not pass the automated tests. As is noted in the readme, you should always confirm the test pass locally before opening a pull request.

Additionally, I am closing as the substance of this change also appears to be incorrect. The new condition appears to be checking whether the LSTM-only model is requested (OEM.LSTM_ONLY), and if the LSTM-only version is not wanted, loading the LSTM-only version. This confusion is likely due to this being an attempt to solve #1034, which upon review, does not appear to be a valid bug report. I have closed that issue.

@Balearica Balearica closed this Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants