diff options
Diffstat (limited to 'packages/main/src/index.ts')
-rw-r--r-- | packages/main/src/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/main/src/index.ts b/packages/main/src/index.ts index 4308d55..b6df67b 100644 --- a/packages/main/src/index.ts +++ b/packages/main/src/index.ts | |||
@@ -39,6 +39,7 @@ import { | |||
39 | openDevToolsWhenReady, | 39 | openDevToolsWhenReady, |
40 | } from './devTools'; | 40 | } from './devTools'; |
41 | import { createRootStore } from './stores/RootStore'; | 41 | import { createRootStore } from './stores/RootStore'; |
42 | import { reduceUserAgent } from './userAgent'; | ||
42 | 43 | ||
43 | const isDevelopment = import.meta.env.MODE === 'development'; | 44 | const isDevelopment = import.meta.env.MODE === 'development'; |
44 | 45 | ||
@@ -66,7 +67,7 @@ app.commandLine.appendSwitch( | |||
66 | 67 | ||
67 | // Remove sophie and electron from the user-agent string to avoid detection. | 68 | // Remove sophie and electron from the user-agent string to avoid detection. |
68 | const originalUserAgent = app.userAgentFallback; | 69 | const originalUserAgent = app.userAgentFallback; |
69 | const userAgent = originalUserAgent.replaceAll(/ ([Ss]ophie|Electron)\/[0-9.]+/g, ''); | 70 | const userAgent = reduceUserAgent(originalUserAgent); |
70 | // Removing the electron version breaks redux devtools, so we only do this in production. | 71 | // Removing the electron version breaks redux devtools, so we only do this in production. |
71 | if (!isDevelopment) { | 72 | if (!isDevelopment) { |
72 | app.userAgentFallback = userAgent; | 73 | app.userAgentFallback = userAgent; |