fix issue adding fields from $filters - added spaces

This commit is contained in:
herteby 2017-06-13 13:18:09 +02:00
parent df6494dc44
commit 96a8d05955

View file

@ -91,7 +91,7 @@ export default class CollectionNode {
// special handling for the $meta filter and conditional operators // special handling for the $meta filter and conditional operators
if (!_.contains(['$or', '$nor', '$not', '$and', '$meta'], field)) { if (!_.contains(['$or', '$nor', '$not', '$and', '$meta'], field)) {
// if the field or the parent of the field already exists, don't add it // if the field or the parent of the field already exists, don't add it
if(!_.has(options.fields,field.split('.')[0])){ if (!_.has(options.fields, field.split('.')[0])){
hasAddedAnyField = true; hasAddedAnyField = true;
options.fields[field] = 1; options.fields[field] = 1;
} }