From 719a32c191b10b9e4e956daf9d6f8ee05f3e99b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=9B=E4=B9=8B=E9=9B=A8?= <49258735+taozhiyu@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:00:07 +0800 Subject: [PATCH] Fix optional path compatibility checks --- 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 ea682c63..5e05e95d 100644 --- a/back/api/script.ts +++ b/back/api/script.ts @@ -85,7 +85,7 @@ export default (app: Router) => { try { const scriptService = Container.get(ScriptService); const content = await scriptService.getFile( - req.query.path as string, + req.query?.path as string || '', req.query.file as string, ); res.send({ code: 200, data: content });