Fix Twitter crashes

This commit is contained in:
Mr. Stallion 2020-12-28 17:06:59 -06:00
parent ed6ee7af4f
commit 710b55ea6c
1 changed files with 4 additions and 0 deletions

View File

@ -659,6 +659,10 @@ function onReady(): void {
createWindow();
}
// Twitter fix
app.commandLine.appendSwitch('disable-features', 'CrossOriginOpenerPolicy');
const isSquirrelStart = require('electron-squirrel-startup'); //tslint:disable-line:no-require-imports
if(isSquirrelStart || process.env.NODE_ENV === 'production' && !app.requestSingleInstanceLock()) app.quit();
else app.on('ready', onReady);