From 3fee82ed9eba6b860fcf12f4b727b19a3b62d83e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 5 Jul 2023 11:44:39 +0800 Subject: [PATCH] :art: --- app/src/layout/dock/Outline.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts index 07985a58c..e1e927bdc 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,