Browse Source

Fix lint error

pull/379/head
Jerome Wu 5 years ago
parent
commit
fa5b267f17
  1. 2
      src/worker-script/index.js

2
src/worker-script/index.js

@ -134,7 +134,7 @@ const loadLanguage = async ({ @@ -134,7 +134,7 @@ const loadLanguage = async ({
res.progress({ workerId, status: 'loaded language traineddata', progress: 1 });
res.resolve(langs);
} catch (err) {
if (isBrowser && err instanceof DOMException) {
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

Loading…
Cancel
Save