Skip to content

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

:sparkles: https://github.com/siyuan-note/siyuan/issues/4042

Vanessa43673732d22d
diff --git a/app/src/menus/tab.ts b/app/src/menus/tab.ts
index 907b613ab9..67fb96fb75 100644
--- a/app/src/menus/tab.ts
+++ b/app/src/menus/tab.ts
@@ -14,7 +14,7 @@ const closeMenu = (model: Model) => {
let midIndex = -1;
currentTab.parent.children.forEach((item: Tab, index: number) => {
const editor = item.model as Editor;
- if (editor.editor?.protyle && !editor.editor?.protyle.updated) {
+ if (!editor || (editor.editor?.protyle && !editor.editor?.protyle.updated)) {
unmodifiedTabs.push(item);
}
if (item.id === currentTab.id) {
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts
index 5606a0347e..98bf96eead 100644
--- a/app/src/protyle/util/onGet.ts
+++ b/app/src/protyle/util/onGet.ts
@@ -76,7 +76,7 @@ export const onGet = (data: IWebSocketData, protyle: IProtyle, action: string[]
protyle.wysiwyg.element.setAttribute("data-doc-type", data.data.type);
}
- // 防止动态加载
+ // 防止动态加载加载过多的内容
if (action.includes(Constants.CB_GET_APPEND) || action.includes(Constants.CB_GET_BEFORE)) {
setHTML({
content: html,