Skip to content

Commit

Permalink
fix the "[object Object]" error
Browse files Browse the repository at this point in the history
  • Loading branch information
NiceygyLive committed May 16, 2024
1 parent aa56fee commit a3071d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ const saveXP = async (userId, xp, level) => {
await connectToDB();
}

xp = xp.toString().split("[object Object]")[1];

const oldObj = await lvl_module.findOne({ userId });

if (!oldObj) {
Expand Down

0 comments on commit a3071d4

Please sign in to comment.