mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-05 18:07:27 -08:00
fix(MongoDB Node): Fix checks on projection feature call (#10563)
This commit is contained in:
parent
14c33f666f
commit
58bab461c4
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue