diff options
author | Balearica <admin@scribeocr.com> | 2022-09-21 03:41:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 03:41:29 +0300 |
commit | 1b87e30ae3f8b8c2bcac40dc8f017ec082fcb9f3 (patch) | |
tree | d04a0ad00cb549f4f44635898e3ddff29da47404 | |
parent | bce7cd84fe823ca970854fe9c2c76d0c75051447 (diff) |
Made all errors in loadLanguage lead to promise rejection per #414 (#669)
-rw-r--r-- | src/worker-script/index.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/worker-script/index.js b/src/worker-script/index.js index 7e65930..e465e81 100644 --- a/src/worker-script/index.js +++ b/src/worker-script/index.js @@ -144,15 +144,7 @@ res) => { res.progress({ workerId, status: 'loaded language traineddata', progress: 1 }); res.resolve(langs); } catch (err) { - if (isWebWorker && err instanceof DOMException) { - /* - * For some reason google chrome throw DOMException in loadLang, - * while other browser is OK, for now we ignore this exception - * and hopefully to find the root cause one day. - */ - } else { - res.reject(err.toString()); - } + res.reject(err.toString()); } }; |