From 96fc917bad4b10dbaad5420a3f4474c10fa98dd1 Mon Sep 17 00:00:00 2001 From: archer <545436317@qq.com> Date: Wed, 5 Apr 2023 22:32:14 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=94=AF=E4=BB=98=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/api/user/checkPayResult.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/api/user/checkPayResult.ts b/src/pages/api/user/checkPayResult.ts index 8012015bf..8fc6906a6 100644 --- a/src/pages/api/user/checkPayResult.ts +++ b/src/pages/api/user/checkPayResult.ts @@ -69,7 +69,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) data: '订单已过期' }); } else { - throw new Error(payRes.trade_state_desc); + throw new Error(payRes?.trade_state_desc || '订单无效'); } } catch (err) { // console.log(err);