Skip to content

Node.js based forum software built for the modern web

fixed mongo listRemoveAll

Baris Soner Usaklibe316ff6022a
diff --git a/src/database/mongo.js b/src/database/mongo.js
index fd07ad7f2a..5f27c9da90 100644
--- a/src/database/mongo.js
+++ b/src/database/mongo.js
@@ -722,6 +722,9 @@
}
module.listRemoveAll = function(key, value, callback) {
+ if(value !== null && value !== undefined) {
+ value = value.toString();
+ }
db.collection('objects').update({_key: key }, { $pull: { array: value } }, function(err, result) {
if(err) {
if(callback) {
diff --git a/src/routes/debug.js b/src/routes/debug.js
index 6bbd06ce9d..d397fa2992 100644
--- a/src/routes/debug.js
+++ b/src/routes/debug.js
@@ -89,7 +89,6 @@ var DebugRoute = function(app) {
});
res.send();
});
-
});
};