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.
undefined
1 parent c36a4b0 commit 0111a7aCopy full SHA for 0111a7a
src/lib/is-browser.ts
@@ -4,7 +4,8 @@ const isStandardBrowserEnv = () => {
4
// Is the process an electron application
5
// check if we are in electron `renderer`
6
const electronRenderCheck =
7
- navigator?.userAgent?.toLowerCase().indexOf(' electron/') > -1
+ typeof navigator !== 'undefined' &&
8
+ navigator.userAgent?.toLowerCase().indexOf(' electron/') > -1
9
if (electronRenderCheck && process?.versions) {
10
const electronMainCheck = Object.prototype.hasOwnProperty.call(
11
process.versions,
0 commit comments