File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ function applyDefaultOptions(optionsArg: BrowserOptions = {}): BrowserOptions {
6363type ExtensionProperties = {
6464 chrome ?: Runtime ;
6565 browser ?: Runtime ;
66+ nw ?: unknown ;
6667} ;
6768type Runtime = {
6869 runtime ?: {
@@ -85,7 +86,11 @@ function shouldShowBrowserExtensionError(): boolean {
8586 const isDedicatedExtensionPage =
8687 ! ! runtimeId && WINDOW === WINDOW . top && extensionProtocols . some ( protocol => href . startsWith ( `${ protocol } //` ) ) ;
8788
88- return ! ! runtimeId && ! isDedicatedExtensionPage ;
89+ // Running in NW.js, which appears like a browser extension but isn't is also fine
90+ // see: https://github.com/getsentry/sentry-javascript/issues/12668
91+ const isNWjs = typeof windowWithMaybeExtension . nw !== 'undefined' ;
92+
93+ return ! ! runtimeId && ! isDedicatedExtensionPage && ! isNWjs ;
8994}
9095
9196/**
You can’t perform that action at this time.
0 commit comments