fix: auto launch

This commit is contained in:
wonfen
2025-03-17 13:51:52 +08:00
parent 8e09bf525e
commit 14f90ac925
3 changed files with 56 additions and 8 deletions

View File

@@ -119,7 +119,13 @@ export async function getAutotemProxy() {
}
export async function getAutoLaunchStatus() {
return invoke<boolean>("get_auto_launch_status");
try {
return await invoke<boolean>("get_auto_launch_status");
} catch (error) {
console.error("获取自启动状态失败:", error);
// 出错时返回false作为默认值
return false;
}
}
export async function changeClashCore(clashCore: string) {