Browse Source

Fixed bug with simd detection

pull/642/head
Balearica 2 years ago
parent
commit
ba394673bd
  1. 4
      src/worker-script/browser/getCore.js

4
src/worker-script/browser/getCore.js

@ -11,9 +11,9 @@ module.exports = async (corePath, res) => {
if (!corePathImport) { if (!corePathImport) {
const simdSupport = await simd(); const simdSupport = await simd();
if (simdSupport) { if (simdSupport) {
corePathImport = `https://unpkg.com/tesseract.js-core@v${dependencies['tesseract.js-core'].substring(1)}/tesseract-core.wasm.js`;
} else {
corePathImport = `https://unpkg.com/tesseract.js-core@v${dependencies['tesseract.js-core'].substring(1)}/tesseract-core-simd.wasm.js`; corePathImport = `https://unpkg.com/tesseract.js-core@v${dependencies['tesseract.js-core'].substring(1)}/tesseract-core-simd.wasm.js`;
} else {
corePathImport = `https://unpkg.com/tesseract.js-core@v${dependencies['tesseract.js-core'].substring(1)}/tesseract-core.wasm.js`;
} }
} }

Loading…
Cancel
Save