Browse Source

Fixed method for selecting env type (#498)

pull/505/head
Ilya 4 years ago committed by GitHub
parent
commit
83a424f9b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/utils/getEnvironment.js

4
src/utils/getEnvironment.js

@ -5,10 +5,10 @@ module.exports = (key) => { @@ -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';
}

Loading…
Cancel
Save