fix: isObjectField(s) empty field

This commit is contained in:
Barış Soner Uşaklı
2021-05-06 12:44:01 -04:00
parent ff98f85488
commit 2c22b06feb
2 changed files with 13 additions and 1 deletions

View File

@@ -156,7 +156,9 @@ module.exports = function (module) {
const data = {};
fields.forEach((field) => {
field = helpers.fieldToString(field);
data[field] = 1;
if (field) {
data[field] = 1;
}
});
const item = await module.client.collection('objects').findOne({ _key: key }, { projection: data });