Skip to content

Commit

Permalink
Detect browsers in a Deno-compatible way (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
yudai-nkt committed Sep 11, 2023
1 parent 71b227f commit d23a8d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/getEnvironment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = (key) => {
env.type = 'webworker';
} else if (isElectron()) {
env.type = 'electron';
} else if (typeof window === 'object') {
} else if (typeof document === 'object') {
env.type = 'browser';
} else if (typeof process === 'object' && typeof require === 'function') {
env.type = 'node';
Expand Down

0 comments on commit d23a8d5

Please sign in to comment.