🐛 fix: await clearHistory() to ensure write completes before response
clearHistory() was the only configStore write call not awaited in its IPC handler. The renderer received 'success' before the file write completed — closing the app immediately after could leave history intact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4dfe88a565
commit
4761d6406c
4
main.js
4
main.js
@ -776,8 +776,8 @@ ipcMain.handle('finish-after-active', () => {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.handle('clear-history', () => {
|
ipcMain.handle('clear-history', async () => {
|
||||||
configStore.clearHistory();
|
await configStore.clearHistory();
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user