From 0c7c09109b92936911bdab91746ddec8697cf029 Mon Sep 17 00:00:00 2001 From: answer-huang Date: Thu, 31 Mar 2022 00:44:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dquery=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BB=A5=20&=20=E7=BB=93=E5=B0=BE=E6=97=B6,=20deepDec?= =?UTF-8?q?odeQuery=20=E5=8F=82=E6=95=B0=E4=BC=9A=E4=B8=BA=20null=20?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/helpers/utils.ts | 2 +- src/public/query.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/utils.ts b/src/helpers/utils.ts index 875570f..a70e2f2 100644 --- a/src/helpers/utils.ts +++ b/src/helpers/utils.ts @@ -456,7 +456,7 @@ export function deepDecodeQuery( } } } else if (typeof it === 'object') { - const childQuery = deepDecodeQuery(it); + const childQuery = deepDecodeQuery(it || {}); formatQuery[key] = childQuery } else { formatQuery[key] = it diff --git a/src/public/query.ts b/src/public/query.ts index 0a07636..6a132fc 100644 --- a/src/public/query.ts +++ b/src/public/query.ts @@ -155,7 +155,7 @@ export function parseQuery( } } if (typeof deepQuery === 'object') { - return deepDecodeQuery(deepQuery); + return deepDecodeQuery(deepQuery || {}); } } }