mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-16 18:07:02 -04:00
UpdaterPage: Do not error if update check failed
This commit is contained in:
parent
57d586fab7
commit
f31fd75efc
5 changed files with 54 additions and 16 deletions
|
@ -4,12 +4,15 @@ import { IpcRes } from './types';
|
|||
|
||||
export const UpdateLogger = new Logger("Updater", "white");
|
||||
export let isOutdated = false;
|
||||
export let updateError: any;
|
||||
export let changes: Record<"hash" | "author" | "message", string>[];
|
||||
|
||||
async function Unwrap<T>(p: Promise<IpcRes<T>>) {
|
||||
const res = await p;
|
||||
|
||||
if (res.ok) return res.value;
|
||||
|
||||
updateError = res.error;
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue