Fix bug on empty getprofile
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user