From dd93b368451f6b286ae06a2df7e0800c7ed0c18b Mon Sep 17 00:00:00 2001 From: shuxiaokai <2581105856@qq.com> Date: Fri, 11 Aug 2023 22:29:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E4=B9=B1=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/server/request/electron.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/server/request/electron.ts b/src/renderer/server/request/electron.ts index 3b80af2d..45130e8d 100644 --- a/src/renderer/server/request/electron.ts +++ b/src/renderer/server/request/electron.ts @@ -88,7 +88,7 @@ async function formatResponseBuffer(bufferData: Buffer, contentType?: string) { const headers = store.state['apidoc/response'].header; const contentDisposition = headers['content-disposition'] as string; let fileName = ''; - const matchedContentDisposition = contentDisposition.match(/filename=(.*)/) + const matchedContentDisposition = contentDisposition?.match(/filename=(.*)/) if (matchedContentDisposition) { fileName = matchedContentDisposition[1]; }