mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 12:01:17 +01:00
possible fix for mongo crash
This commit is contained in:
@@ -103,6 +103,7 @@
|
||||
<div class="alert alert-warning">
|
||||
<strong>Post Delay</strong><br /> <input type="text" class="form-control" value="10000" data-field="postDelay"><br />
|
||||
<strong>Minimum Title Length</strong><br /> <input type="text" class="form-control" value="3" data-field="minimumTitleLength"><br />
|
||||
<strong>Maximum Title Length</strong><br /> <input type="text" class="form-control" value="255" data-field="maximumTitleLength"><br />
|
||||
<strong>Minimum Post Length</strong><br /> <input type="text" class="form-control" value="8" data-field="minimumPostLength"><br />
|
||||
<strong>Chat Messages To Display</strong><br /> <input type="text" class="form-control" value="50" data-field="chatMessagesToDisplay"><br />
|
||||
<div class="checkbox">
|
||||
|
||||
@@ -303,7 +303,11 @@
|
||||
|
||||
var _fields = {};
|
||||
for(var i=0; i<fields.length; ++i) {
|
||||
_fields[fields[i].replace(/\./g, '\uff0E')] = 1;
|
||||
if(typeof fields[i] !== string) {
|
||||
_fields[fields[i].toString().replace(/\./g, '\uff0E')] = 1;
|
||||
} else {
|
||||
_fields[fields[i].replace(/\./g, '\uff0E')] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
db.collection('objects').findOne({_key:key}, _fields, function(err, item) {
|
||||
|
||||
Reference in New Issue
Block a user