Skip to content

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

fix: 未打开文档时点击大纲会弹出 `未找到 ID 为 [] 的内容块` (#14026)

Jeffrey Chen208820067759
diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts
index 77ae5045ab..5e5a0b86f5 100644
--- a/app/src/layout/dock/Outline.ts
+++ b/app/src/layout/dock/Outline.ts
@@ -178,7 +178,7 @@ export class Outline extends Model {
break;
}
break;
- } else if (target.isSameNode(this.headerElement.nextElementSibling) || target.classList.contains("block__icons")) {
+ } else if (this.blockId && (target.isSameNode(this.headerElement.nextElementSibling) || target.classList.contains("block__icons"))) {
openFileById({
app: options.app,
id: this.blockId,