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:
@ -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) => {
|
||||
|
Reference in New Issue
Block a user