make sure the matchedProfileId has proper format

This commit is contained in:
ibratabian17
2024-09-24 01:08:26 +08:00
parent d50930dd79
commit 467b3dd475

View File

@@ -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) {