limit error notifications in macos update service (#182269)

fixes #182250
This commit is contained in:
João Moreno
2023-05-12 09:57:32 +02:00
committed by GitHub
parent 5860847717
commit 0ca6d0fb1d

View File

@@ -50,8 +50,7 @@ export class DarwinUpdateService extends AbstractUpdateService {
this.logService.error('UpdateService error:', err);
// only show message when explicitly checking for updates
const shouldShowMessage = this.state.type === StateType.CheckingForUpdates ? this.state.explicit : true;
const message: string | undefined = shouldShowMessage ? err : undefined;
const message = (this.state.type === StateType.CheckingForUpdates && this.state.explicit) ? err : undefined;
this.setState(State.Idle(UpdateType.Archive, message));
}