fix: handle error response during update check in UpdateNotification component
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user