From fa5b267f17dfa97952cb24edbabcb98626e53a6f Mon Sep 17 00:00:00 2001 From: Jerome Wu Date: Sat, 21 Dec 2019 16:45:09 +0800 Subject: [PATCH] Fix lint error --- 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 074c2dd..f157c23 100644 --- a/src/worker-script/index.js +++ b/src/worker-script/index.js @@ -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