Skip to content

Commit

Permalink
Merge pull request #24 from tolerious/feat/reading-articles
Browse files Browse the repository at this point in the history
🎨 Fix bug.
  • Loading branch information
tolerious authored Dec 14, 2024
2 parents d3ba448 + e0f9075 commit af0754c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/word.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ router.post("/delete", async function (req, res, next) {
}
const group = await wordGroupModel.findById(groupId);
group.wordCount--;
if (group.wordCount < 0) group[0].wordCount = 0;
if (group.wordCount < 0) group.wordCount = 0;
await group.save();
let doc = await wordModel.findByIdAndDelete(id).exec();
res.json(generateResponse(doc));
Expand Down

0 comments on commit af0754c

Please sign in to comment.