From 62fca3dfe2e7afcc6114e384053c61a9d78645ff Mon Sep 17 00:00:00 2001 From: whyour Date: Thu, 11 Nov 2021 22:50:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/cron.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/back/services/cron.ts b/back/services/cron.ts index 152b6f82..7f9b9e67 100644 --- a/back/services/cron.ts +++ b/back/services/cron.ts @@ -352,6 +352,10 @@ export default class CronService { public async log(_id: string) { const doc = await this.get(_id); + if (!doc) { + return ''; + } + if (doc.log_path) { return getFileContentByName(`${doc.log_path}`); }