fix: handle error response during update check in UpdateNotification component
This commit is contained in:
1 parent
b08b4b4129
commit
a713141420
1 file changed
+9
-1
@@ -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