Replaced custom check by Utils check
MODIFY
src/storage/mongodb/DatabaseUtils.ts
src/storage/mongodb/DatabaseUtils.ts
@@ -245,7 +245,7 @@ export default class DatabaseUtils {
}
public static projectFields(aggregation: any[], projectedFields: string[], removedFields: string[] = []): void {
- if (projectedFields && projectedFields.length > 0) {
+ if (!Utils.isEmptyArray(projectedFields)) {
const project = {
$project: {}
};

Replaced custom check by Utils check