Skip to content

Commit

Permalink
Fixed method for selecting env type (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
LoginovIlya authored Nov 28, 2020
1 parent 909263b commit 83a424f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/getEnvironment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit 83a424f

Please sign in to comment.