fix(filelib-web): 文件内容无变化时不提交 commit

This commit is contained in:
2026-07-27 21:21:15 +08:00
parent 1dab83f9db
commit 8eda04f1d9
@@ -47,6 +47,11 @@
async function save(): Promise<void> {
if (file === null) return;
// 内容未变化时不提交,避免产生空 commit。
if (draft === file.content) {
toastOk("内容无变化,未提交");
return;
}
try {
const r = await api<{ version: string }>(`/database/api/projects/${projectId}/file/commits`, {
method: "POST",