chore: rm then

This commit is contained in:
GyDi 2022-03-12 23:58:20 +08:00
parent 4991f7ff39
commit dc9bcc40ee
No known key found for this signature in database
GPG Key ID: 1C95E0D3467B3084

View File

@ -84,13 +84,13 @@ export async function killSidecars() {
}
export async function openAppDir() {
return invoke<void>("open_app_dir")
.then((message) => console.log(message))
.catch((err) => Notice.error(err?.message || err.toString(), 1500));
return invoke<void>("open_app_dir").catch((err) =>
Notice.error(err?.message || err.toString(), 1500)
);
}
export async function openLogsDir() {
return invoke<void>("open_logs_dir")
.then((message) => console.log(message))
.catch((err) => Notice.error(err?.message || err.toString(), 1500));
return invoke<void>("open_logs_dir").catch((err) =>
Notice.error(err?.message || err.toString(), 1500)
);
}