fix: handle error response during update check in UpdateNotification component

This commit is contained in:
2026-02-22 01:19:56 +11:00
parent b08b4b4129
commit a713141420

View File

@@ -61,7 +61,15 @@ export function UpdateNotification() {
try { try {
const result = await (window as any).electron.updater.checkForUpdates(); const result = await (window as any).electron.updater.checkForUpdates();
console.log('Update check result:', result); console.log('Update check result:', result);
// If no update found, show feedback
// Handle error response (including dev mode error)
if (!result.success) {
console.warn('Update check failed:', result.error);
setChecking(false);
return;
}
// If no update found, show feedback briefly
setTimeout(() => { setTimeout(() => {
if (!updateAvailable) { if (!updateAvailable) {
setChecking(false); setChecking(false);