We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8526880 commit e120cbbCopy full SHA for e120cbb
src/common/electron/IS_ELECTRON_ENV.ts
@@ -1,4 +1,6 @@
1
-const userAgent = typeof navigator === "undefined" ? "" : navigator.userAgent.toLowerCase();
+const userAgent = (
2
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase()
3
+) || "";
4
const isElectronEnv = userAgent.includes(" electron/");
5
6
export default isElectronEnv;
0 commit comments