Skip to content

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

:art:

Vanessa3fee82ed9eba
diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts
index 07985a58c7..e1e927bdcb 100644
--- a/app/src/layout/dock/Outline.ts
+++ b/app/src/layout/dock/Outline.ts
@@ -117,7 +117,7 @@ export class Outline extends Model {
} else {
openFileById({
app: options.app,
- id: this.blockId,
+ id: this.blockId,
mode: "preview",
});
}
@@ -194,12 +194,14 @@ export class Outline extends Model {
});
if (this.isPreview) {
- fetchPost("/api/export/preview", {
- id: this.blockId,
- }, response => {
- response.data = response.data.outline;
- this.update(response);
- });
+ if (this.blockId) {
+ fetchPost("/api/export/preview", {
+ id: this.blockId,
+ }, response => {
+ response.data = response.data.outline;
+ this.update(response);
+ });
+ }
} else {
fetchPost("/api/outline/getDocOutline", {
id: this.blockId,