Skip to content

Commit

Permalink
Fixed compatibility with electron by removing legacy special case per #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Balearica committed Dec 24, 2024
1 parent 15ed597 commit 70219dc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"dependencies": {
"bmp-js": "^0.1.0",
"idb-keyval": "^6.2.0",
"is-electron": "^2.2.2",
"is-url": "^1.2.4",
"node-fetch": "^2.6.9",
"opencollective-postinstall": "^2.0.3",
Expand Down
4 changes: 0 additions & 4 deletions src/utils/getEnvironment.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
const isElectron = require('is-electron');

module.exports = (key) => {
const env = {};

if (typeof WorkerGlobalScope !== 'undefined') {
env.type = 'webworker';
} else if (isElectron()) {
env.type = 'electron';
} else if (typeof document === 'object') {
env.type = 'browser';
} else if (typeof process === 'object' && typeof require === 'function') {
Expand Down

0 comments on commit 70219dc

Please sign in to comment.