From 467b3dd475d259e5b745e8533ab057dc2023ca8c Mon Sep 17 00:00:00 2001 From: ibratabian17 Date: Tue, 24 Sep 2024 01:08:26 +0800 Subject: [PATCH] make sure the matchedProfileId has proper format --- core/route/account.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/route/account.js b/core/route/account.js index 4ce2ea1..364316a 100644 --- a/core/route/account.js +++ b/core/route/account.js @@ -213,7 +213,7 @@ exports.initroute = (app) => { // Find matching profile by name or ticket const matchedProfileId = Object.keys(decryptedData).find(profileId => { const userProfile = decryptedData[profileId]; - return userProfile.name === content.name || userProfile.ticket === ticket; + return userProfile.name && (userProfile.name === content.name || userProfile.ticket === ticket); }); if (matchedProfileId) {