Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Fix snapshot category switching after empty snapshot list https://github.com/siyuan-note/siyuan/issues/18479

Daniel9736870680fd
diff --git a/app/src/history/history.ts b/app/src/history/history.ts
index 662be47432..d09f04fb72 100644
--- a/app/src/history/history.ts
+++ b/app/src/history/history.ts
@@ -113,7 +113,7 @@ const renderDoc = (element: HTMLElement, currentPage: number) => {
const renderRepoItem = (response: IWebSocketData, element: Element, type: string) => {
if (response.data.snapshots.length === 0) {
- element.lastElementChild.innerHTML = `<li class="b3-list--empty">${window.siyuan.languages.emptyContent}</li>`;
+ element.querySelector('[data-type="repoList"]').innerHTML = `<li class="b3-list--empty">${window.siyuan.languages.emptyContent}</li>`;
return;
}
let actionHTML = "";