forked from matrix/element-web
Fix origin migrator for SSO logins
For some reason this was trying to close the same window twice when the app was reloaded after an SSO login. Possibly also a problem on electron < 6 - presumably a race condition.
This commit is contained in:
parent
00130e6ac6
commit
835d7bfb9d
|
@ -33,7 +33,7 @@ async function migrateFromOldOrigin() {
|
||||||
webgl: false,
|
webgl: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
ipcMain.on('origin_migration_complete', (e, success, sentSummary, storedSummary) => {
|
ipcMain.once('origin_migration_complete', (e, success, sentSummary, storedSummary) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
console.log("Origin migration completed successfully!");
|
console.log("Origin migration completed successfully!");
|
||||||
} else {
|
} else {
|
||||||
|
@ -44,7 +44,7 @@ async function migrateFromOldOrigin() {
|
||||||
migrateWindow.close();
|
migrateWindow.close();
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
ipcMain.on('origin_migration_nodata', (e) => {
|
ipcMain.once('origin_migration_nodata', (e) => {
|
||||||
console.log("No session to migrate from old origin");
|
console.log("No session to migrate from old origin");
|
||||||
migrateWindow.close();
|
migrateWindow.close();
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Reference in New Issue