Detect browsers in a Deno-compatible way (#821)

master
Yudai Nakata 1 year ago committed by GitHub
parent 71b227f2e0
commit d23a8d5758
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/utils/getEnvironment.js

@ -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';

Loading…
Cancel
Save