Skip to content

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

:bug: Fix tab content blank after refresh due to incomplete breakObj guard #18034

Danielf06e099ccc0d
diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts
index ee06ddf8df..5eba1dcf02 100644
--- a/app/src/layout/util.ts
+++ b/app/src/layout/util.ts
@@ -602,7 +602,7 @@ export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any, brea
json.instance = "Tab";
json.activeTime = layout.headElement?.getAttribute("data-activetime");
} else if (layout instanceof Editor) {
- if (!layout.editor.protyle.notebookId && breakObj) {
+ if ((!layout.editor.protyle.notebookId || !layout.editor.protyle.block.id || !layout.editor.protyle.block.rootID) && breakObj) {
breakObj.editor = "true";
}
json.notebookId = layout.editor.protyle.notebookId;