Skip to content

Commit

Permalink
fix getting xp for new usr
Browse files Browse the repository at this point in the history
  • Loading branch information
NiceygyLive committed Jul 19, 2024
1 parent 7de8601 commit b8912a3
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 @@ -269,7 +269,7 @@ const getXP = async (userId) => {
}
const userRank = await lvl_module.findOne({ userId });
consoleMessage("XP retreived sucsessfully! Returning...", "mongoDB/getXP")
return userRank.xp;
return userRank.xp ?? 0;
};

const getEconomy = async (userId) => {
Expand Down

0 comments on commit b8912a3

Please sign in to comment.