mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(MongoDB Node): Fix checks on projection feature call (#10563)
This commit is contained in:
@@ -210,7 +210,11 @@ export class MongoDb implements INodeType {
|
|||||||
query = query.sort(sort);
|
query = query.sort(sort);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (projection && projection instanceof Document) {
|
if (
|
||||||
|
projection &&
|
||||||
|
Object.keys(projection).length !== 0 &&
|
||||||
|
projection.constructor === Object
|
||||||
|
) {
|
||||||
query = query.project(projection);
|
query = query.project(projection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user