修复右侧边栏“提交”区域在没有提交记录时显示错误

This commit is contained in:
xintaofei
2026-03-12 22:51:53 +08:00
parent 7a6ddb87ba
commit 080a969c1e
4 changed files with 14 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ import { revealItemInDir } from "@tauri-apps/plugin-opener"
import ignore from "ignore"
import { Check, ChevronRight } from "lucide-react"
import { useTranslations } from "next-intl"
import { toErrorMessage } from "@/lib/app-error"
import { toast } from "sonner"
import { useFolderContext } from "@/contexts/folder-context"
import { useAuxPanelContext } from "@/contexts/aux-panel-context"
@@ -947,7 +948,7 @@ export function FileTreeTab() {
setGitStatusByPath(new Map())
}
} catch (e) {
setError(e instanceof Error ? e.message : String(e))
setError(toErrorMessage(e))
} finally {
if (!silent && !loadingReleased) setLoading(false)
}