From fd3e9bd96550e36cd128771a5d5d04193f8be08e Mon Sep 17 00:00:00 2001 From: chaoszhu Date: Sat, 27 Jun 2026 14:49:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DipWhiteList=E8=84=8F?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app/controller/sessionLog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/app/controller/sessionLog.js b/server/app/controller/sessionLog.js index ffb92a0..a970282 100644 --- a/server/app/controller/sessionLog.js +++ b/server/app/controller/sessionLog.js @@ -4,8 +4,8 @@ const sessionDB = new SessionDB().getInstance() async function getLog({ res }) { let sessionList = await sessionDB.findAsync({}) - let { ipWhiteList } = await keyDB.findOneAsync({}) - ipWhiteList = ipWhiteList.filter(ip => Boolean(ip)) + let { ipWhiteList = [] } = await keyDB.findOneAsync({}) || {} + ipWhiteList = ipWhiteList.filter(ip => typeof ip === 'string' && ip.trim() !== '') sessionList = sessionList.map(item => { // eslint-disable-next-line no-unused-vars const { session, ...otherInfo } = item