Skip to content

Commit f14ee07

Browse files
cubapCopilot
andauthored
Update controllers/utils.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent cdafefa commit f14ee07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

controllers/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function createExpressError(err) {
126126
const remove = async function(id) {
127127
try {
128128
const result = await db.deleteOne({"$or":[{"_id": id}, {"__rerum.slug": id}]})
129-
if (!result.deletedCount === 1) {
129+
if (result.deletedCount !== 1) {
130130
throw Error("Could not remove object")
131131
}
132132
return true

0 commit comments

Comments
 (0)