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.
isInElectron
1 parent eb5d3e8 commit 60dea66Copy full SHA for 60dea66
packages/shared/src/env.ts
@@ -11,7 +11,7 @@ export const target = (typeof window !== 'undefined'
11
12
export const isInChromePanel = typeof target.chrome !== 'undefined' && !!target.chrome.devtools
13
export const isInIframe = isBrowser && target.self !== target.top
14
-export const isInElectron = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().includes('electron')
+export const isInElectron = typeof navigator !== 'undefined' && navigator.userAgent?.toLowerCase().includes('electron')
15
// @ts-expect-error skip type check
16
export const isNuxtApp = typeof window !== 'undefined' && !!window.__NUXT__
17
export const isInSeparateWindow = !isInIframe && !isInChromePanel && !isInElectron
0 commit comments