Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/naptha/tesseract.js.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya <LoginovIlya@users.noreply.github.com>2020-11-28 03:01:30 +0300
committerGitHub <noreply@github.com>2020-11-28 03:01:30 +0300
commit83a424f9b9058e940070979327ef255d875f6c7b (patch)
tree0cac8231d3c2db2436ba6c1fe168f0254dcc0f91
parent909263b94ba11db149289faffa21a7ac3eb51657 (diff)
Fixed method for selecting env type (#498)
-rw-r--r--src/utils/getEnvironment.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/getEnvironment.js b/src/utils/getEnvironment.js
index 03f5663..da7d3ea 100644
--- a/src/utils/getEnvironment.js
+++ b/src/utils/getEnvironment.js
@@ -5,10 +5,10 @@ module.exports = (key) => {
if (typeof WorkerGlobalScope !== 'undefined') {
env.type = 'webworker';
- } else if (typeof window === 'object') {
- env.type = 'browser';
} else if (isElectron()) {
env.type = 'electron';
+ } else if (typeof window === 'object') {
+ env.type = 'browser';
} else if (typeof process === 'object' && typeof require === 'function') {
env.type = 'node';
}