From b33aa174ae6c19a20382067bdb6143055bdbd0c5 Mon Sep 17 00:00:00 2001 From: zhuxindong <501801307@qq.com> Date: Wed, 13 Aug 2025 15:40:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AE=A1=E7=90=86=E5=91=98=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=B3=A8=E5=86=8C=E6=97=B6=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E7=8A=B6=E6=80=81=E4=B8=BA=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/src/storage/mongo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/storage/mongo.ts b/service/src/storage/mongo.ts index 5ebff659..9dab4e7b 100644 --- a/service/src/storage/mongo.ts +++ b/service/src/storage/mongo.ts @@ -435,7 +435,7 @@ export async function createUser(email: string, password: string, roles?: UserRo if (roles && roles.includes(UserRole.Admin)) userInfo.status = Status.Normal // Using `if (status !== null)` check because status.Normal value is 0, so `if (status)` would fail when status is Normal - if (status !== null) + if (status != null) userInfo.status = status userInfo.roles = roles