unconventional 1.13.0 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/base.model.js +2 -2
- package/package.json +1 -1
package/dist/core/base.model.js
CHANGED
|
@@ -213,9 +213,9 @@ class BaseModel extends Document {
|
|
|
213
213
|
for (let item of dataArray) {
|
|
214
214
|
for (const [key, options] of propSummary) {
|
|
215
215
|
// Mask private fields. Skip 1st level if relationsOnly.
|
|
216
|
-
if (!relationsOnly && key
|
|
216
|
+
if (!relationsOnly && item[key] != null && options.private != null) {
|
|
217
217
|
if (Array.isArray(item[key])) {
|
|
218
|
-
item[key] = item[key].filter(rel => !(0, utils_1.evaluate)(options.private, item, rel));
|
|
218
|
+
item[key] = item[key].filter(rel => rel != null && !(0, utils_1.evaluate)(options.private, item, rel));
|
|
219
219
|
if (item[key].length === 0)
|
|
220
220
|
continue;
|
|
221
221
|
}
|