Fix bug on empty getprofile

This commit is contained in:
aeroreyna
2022-02-20 22:33:32 -08:00
parent ca44e5b424
commit 3610482aec
+1
View File
@@ -39,6 +39,7 @@ userDB = (DB) => {
DB.getProfile = async (profileId) => { DB.getProfile = async (profileId) => {
//if (userProfileCache[profileId] && !userProfileCache[profileId].isGroup) return userProfileCache[profileId]; //if (userProfileCache[profileId] && !userProfileCache[profileId].isGroup) return userProfileCache[profileId];
if(!profileId) return false;
const _id = DB.ObjectID(profileId); const _id = DB.ObjectID(profileId);
let r = await DB.profileCols.findOne({ _id }).catch((err) => { let r = await DB.profileCols.findOne({ _id }).catch((err) => {
console.log(err); console.log(err);