Skip to content

Commit 835d7bf

Browse files
committed
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.
1 parent 00130e6 commit 835d7bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

electron_app/src/originMigrator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async function migrateFromOldOrigin() {
3333
webgl: false,
3434
},
3535
});
36-
ipcMain.on('origin_migration_complete', (e, success, sentSummary, storedSummary) => {
36+
ipcMain.once('origin_migration_complete', (e, success, sentSummary, storedSummary) => {
3737
if (success) {
3838
console.log("Origin migration completed successfully!");
3939
} else {
@@ -44,7 +44,7 @@ async function migrateFromOldOrigin() {
4444
migrateWindow.close();
4545
resolve();
4646
});
47-
ipcMain.on('origin_migration_nodata', (e) => {
47+
ipcMain.once('origin_migration_nodata', (e) => {
4848
console.log("No session to migrate from old origin");
4949
migrateWindow.close();
5050
resolve();

0 commit comments

Comments
 (0)