1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

fix: JavaScript error at first startup, fixes #736

This commit is contained in:
2023-12-25 09:35:43 +01:00
parent b055350726
commit b734b24679

View File

@ -36,9 +36,15 @@ export default () => {
name: 'session',
fileExtension: ''
});
const encrypted = sessionStore.get('key') as string;
const key = safeStorage.decryptString(Buffer.from(encrypted, 'utf-8'));
event.returnValue = key;
try {
const encrypted = sessionStore.get('key') as string;
const key = safeStorage.decryptString(Buffer.from(encrypted, 'utf-8'));
event.returnValue = key;
}
catch (error) {
event.returnValue = false;
}
});
ipcMain.handle('show-open-dialog', (event, options) => {