From 5e9874a9c64a56649bcdc70cc1b4022b10bd0a52 Mon Sep 17 00:00:00 2001 From: tomatoknight Date: Thu, 25 Nov 2021 11:21:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B0=83=E8=AF=95=E9=80=89?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=8E=A5=E5=8F=A3=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/api/script.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/api/script.ts b/back/api/script.ts index 47376d1d..d4a1f7fe 100644 --- a/back/api/script.ts +++ b/back/api/script.ts @@ -86,7 +86,7 @@ export default (app: Router) => { try { const filePath = join( config.scriptPath, - req.query.path as string, + req.query.path as string | undefined || '', req.params.file, ); const content = getFileContentByName(filePath);