From 2084ff3e219166cdb09a34321a4f222f7a25a3a0 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Wed, 21 Jan 2026 17:04:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E5=AF=B9=E7=A9=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=96=87=E4=BB=B6=E7=9A=84=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E7=A1=AE=E4=BF=9D=E8=BF=94=E5=9B=9E=E7=A9=BA=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ccw/src/core/routes/hooks-routes.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ccw/src/core/routes/hooks-routes.ts b/ccw/src/core/routes/hooks-routes.ts index cd4ef20e..6f7ac301 100644 --- a/ccw/src/core/routes/hooks-routes.ts +++ b/ccw/src/core/routes/hooks-routes.ts @@ -39,6 +39,9 @@ function readSettingsFile(filePath: string): Record { return {}; } const content = readFileSync(filePath, 'utf8'); + if (!content.trim()) { + return {}; + } return JSON.parse(content); } catch (error: unknown) { console.error(`Error reading settings file ${filePath}:`, error);