We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9183e8e commit 3daefbcCopy full SHA for 3daefbc
src/Routers/AggregateRouter.js
@@ -79,9 +79,11 @@ export class AggregateRouter extends ClassesRouter {
79
static getPipeline(body) {
80
let pipeline = body.pipeline || body;
81
if (!Array.isArray(pipeline)) {
82
- pipeline = Object.keys(pipeline).map(key => {
83
- return { [key]: pipeline[key] };
84
- });
+ pipeline = Object.keys(pipeline)
+ .filter(key => pipeline[key] !== undefined)
+ .map(key => {
85
+ return { [key]: pipeline[key] };
86
+ });
87
}
88
89
return pipeline.map(stage => {
0 commit comments