Skip to content

Commit

Permalink
Update mongodb.js
Browse files Browse the repository at this point in the history
  • Loading branch information
O.Whale authored Jul 20, 2024
1 parent 87925d7 commit b17a751
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ const getXP = async (userId) => {
}
const userRank = await lvl_module.findOne({ userId });
consoleMessage("XP retreived sucsessfully! Returning...", "mongoDB/getXP")
return userRank.xp ?? 0;
if (userRank != null) {return userRank.xp ?? 0;} else {return 0;}
};

/**
Expand Down

0 comments on commit b17a751

Please sign in to comment.