aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
authorLibravatar Mahadevan Sreenivasan <mahadevan_sv@yahoo.com>2020-10-02 17:53:15 +0530
committerLibravatar GitHub <noreply@github.com>2020-10-02 13:23:15 +0100
commit85b2a241b9c6ccbb404f84eda9706b0422a4ceef (patch)
tree993212878b942a90e547ef1adba8ec47f534c8a8 /src/index.js
parentAdd recipes packaging to development setup (#985) (diff)
downloadferdium-app-85b2a241b9c6ccbb404f84eda9706b0422a4ceef.tar.gz
ferdium-app-85b2a241b9c6ccbb404f84eda9706b0422a4ceef.tar.zst
ferdium-app-85b2a241b9c6ccbb404f84eda9706b0422a4ceef.zip
Fix Electron 9 crash on Windows 10 (#986)
Co-authored-by: Amine Mouafik <amine@mouafik.fr> Co-authored-by: vantezzen <hello@vantezzen.io> Co-authored-by: Sampath Kumar Krishnan <sampathBlam@users.noreply.github.com>
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index e39434a3b..66ae3ad00 100644
--- a/src/index.js
+++ b/src/index.js
@@ -53,6 +53,13 @@ import userAgent from './helpers/userAgent-helpers';
53 53
54const debug = require('debug')('Ferdi:App'); 54const debug = require('debug')('Ferdi:App');
55 55
56// From Electron 9 onwards, app.allowRendererProcessReuse = true by default. This causes the app to crash on Windows due to the
57// Electron Windows Notification API crashing. Setting this to false fixes the issue until the electron team fixes the notification bug
58// More Info - https://github.com/electron/electron/issues/18397
59if (isWindows) {
60 app.allowRendererProcessReuse = false;
61}
62
56// Globally set useragent to fix user agent override in service workers 63// Globally set useragent to fix user agent override in service workers
57debug('Set userAgent to ', userAgent()); 64debug('Set userAgent to ', userAgent());
58app.userAgentFallback = userAgent(); 65app.userAgentFallback = userAgent();
@@ -326,7 +333,7 @@ const createWindow = () => {
326 333
327 app.mainWindow = mainWindow; 334 app.mainWindow = mainWindow;
328 app.isMaximized = mainWindow.isMaximized(); 335 app.isMaximized = mainWindow.isMaximized();
329 336
330 mainWindow.webContents.on('new-window', (e, url) => { 337 mainWindow.webContents.on('new-window', (e, url) => {
331 debug('Open url', url); 338 debug('Open url', url);
332 e.preventDefault(); 339 e.preventDefault();