From 3610482aecc6e734d68fef90e7c8aff3d7840c51 Mon Sep 17 00:00:00 2001 From: aeroreyna Date: Sun, 20 Feb 2022 22:33:32 -0800 Subject: [PATCH] Fix bug on empty getprofile --- dbTools/profile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dbTools/profile.js b/dbTools/profile.js index 74c334c..c543810 100644 --- a/dbTools/profile.js +++ b/dbTools/profile.js @@ -39,6 +39,7 @@ userDB = (DB) => { DB.getProfile = async (profileId) => { //if (userProfileCache[profileId] && !userProfileCache[profileId].isGroup) return userProfileCache[profileId]; + if(!profileId) return false; const _id = DB.ObjectID(profileId); let r = await DB.profileCols.findOne({ _id }).catch((err) => { console.log(err);